Small optimization

This commit is contained in:
Pierre Pronchery 2008-04-12 23:13:07 +00:00
parent df4a75df97
commit a46dd04d09

View File

@ -890,7 +890,6 @@ static int _pre_exec_in(AppInterfaceCallArg * aica, char buf[], size_t buflen,
uint32_t size; uint32_t size;
Buffer ** b; Buffer ** b;
*p = NULL;
switch(aica->type) switch(aica->type)
{ {
case AICT_VOID: case AICT_VOID:
@ -907,16 +906,14 @@ static int _pre_exec_in(AppInterfaceCallArg * aica, char buf[], size_t buflen,
if(_read_bytes(&i16, sizeof(i16), buf, buflen, pos) if(_read_bytes(&i16, sizeof(i16), buf, buflen, pos)
!= 0) != 0)
return -1; return -1;
i16 = ntohs(i16); *l = ntohs(i16);
*l = i16;
break; break;
case AICT_INT32: case AICT_INT32:
case AICT_UINT32: case AICT_UINT32:
if(_read_bytes(&i32, sizeof(i32), buf, buflen, pos) if(_read_bytes(&i32, sizeof(i32), buf, buflen, pos)
!= 0) != 0)
return -1; return -1;
i32 = ntohl(i32); *l = ntohl(i32);
*l = i32;
break; break;
case AICT_INT64: /* FIXME not supported */ case AICT_INT64: /* FIXME not supported */
case AICT_UINT64: case AICT_UINT64:
@ -938,7 +935,6 @@ static int _pre_exec_in(AppInterfaceCallArg * aica, char buf[], size_t buflen,
} }
break; break;
case AICT_STRING: case AICT_STRING:
p = arg;
if((*p = _read_string(buf, buflen, pos)) == NULL) if((*p = _read_string(buf, buflen, pos)) == NULL)
return -1; return -1;
break; break;