--- libaitmqtt/src/sub.c 2012/04/26 12:33:14 1.1.1.1.2.3 +++ libaitmqtt/src/sub.c 2012/04/27 08:12:30 1.1.1.1.2.4 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: sub.c,v 1.1.1.1.2.3 2012/04/26 12:33:14 misho Exp $ +* $Id: sub.c,v 1.1.1.1.2.4 2012/04/27 08:12:30 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -314,8 +314,7 @@ mqtt_readSUBSCRIBE(mqtt_msg_t * __restrict buf, u_shor mqtt_SetErr(EINVAL, "Short message length %d", len); return -1; } - subs = mqtt_subRealloc(subs, i + 1); - if (!subs) { + if (!mqtt_subRealloc(&subs, i + 1)) { mqtt_subFree(subscr); return -1; } else @@ -438,8 +437,7 @@ mqtt_readUNSUBSCRIBE(mqtt_msg_t * __restrict buf, u_sh mqtt_SetErr(EINVAL, "Short message length %d", len); return -1; } - subs = mqtt_subRealloc(subs, i + 1); - if (!subs) { + if (!mqtt_subRealloc(&subs, i + 1)) { mqtt_subFree(subscr); return -1; } else