Hello,
I don't know what realloc() does, the code looks like this
while (size > 0) { interface->altsetting = realloc(interface->altsetting, sizeof(struct usb_interface_descriptor) * (interface->num_altsetting + 1)); if (!interface->altsetting) { if (usb_debug >= 1) fprintf(stderr, "couldn't malloc interface->altsetting\n"); return -1; } .... }
So I was wonder is its extend or just allocating a new block of memory?
Kind regards Rene W. Olsen