Use an INT64 for the return value instead

This commit is contained in:
Pierre Pronchery 2014-04-26 01:41:50 +08:00
parent d8631d4458
commit c4d8e48686

View File

@ -92,7 +92,7 @@ static int _appclient_call(int verbose, AppClient * ac, AppClientCall * call)
{ {
int ret = 0; int ret = 0;
Variable * v; Variable * v;
int32_t res; int64_t res;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "DEBUG: %s()\n", __func__); fprintf(stderr, "DEBUG: %s()\n", __func__);
@ -107,7 +107,7 @@ static int _appclient_call(int verbose, AppClient * ac, AppClientCall * call)
{ {
case 0: case 0:
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "DEBUG: %s() %s() res=%d\n", __func__, fprintf(stderr, "DEBUG: %s() %s() res=%ld\n", __func__,
call->name, res); call->name, res);
#endif #endif
ret = appclient_call_variable(ac, v, call->name, NULL); ret = appclient_call_variable(ac, v, call->name, NULL);
@ -196,8 +196,8 @@ static int _appclient_call(int verbose, AppClient * ac, AppClientCall * call)
} }
if(ret == 0 && verbose) if(ret == 0 && verbose)
{ {
if(v != NULL && variable_get_as(v, VT_INT32, &res) == 0) if(v != NULL && variable_get_as(v, VT_INT64, &res) == 0)
printf("\"%s\"%s%d\n", call->name, " returned ", res); printf("\"%s\"%s%ld\n", call->name, " returned ", res);
else else
printf("\"%s\"%s\n", call->name, " returned"); printf("\"%s\"%s\n", call->name, " returned");
} }