X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=ui%2Fcommon%2Fdiscover-client.c;h=e8ce4dd91bda53c88230441d32815eb20ad44e0f;hp=b1ef440a9127e927f3e6456fb25688248f05ecc7;hb=3bb091f52586bee88ed0d9380ce4df55d837fd5e;hpb=47a9f94bb346817b6767d5dac578a43beee47c1f diff --git a/ui/common/discover-client.c b/ui/common/discover-client.c index b1ef440..e8ce4dd 100644 --- a/ui/common/discover-client.c +++ b/ui/common/discover-client.c @@ -111,7 +111,7 @@ static void device_remove(struct discover_client *client, const char *id) /* remove the device from the client's device array */ client->n_devices--; memmove(&client->devices[i], &client->devices[i+1], - client->n_devices - i); + (client->n_devices - i) * sizeof(client->devices[0])); client->devices = talloc_realloc(client, client->devices, struct device *, client->n_devices);