X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fdelete_image.c;h=0753949034cedf30e2c7348fbada327323ed8b38;hb=49f2ae12d9940ab43f9a6df793facb1d8dddf5ea;hp=ecd80478f7cf73d62461c53c5fb00b4294db7f0a;hpb=40beb80283a2df7af88c8359ca41adb814585e9a;p=wimlib diff --git a/src/delete_image.c b/src/delete_image.c index ecd80478..07539490 100644 --- a/src/delete_image.c +++ b/src/delete_image.c @@ -62,13 +62,13 @@ WIMLIBAPI int wimlib_delete_image(WIMStruct *w, int image) if (ret != 0) return ret; - /* Free the dentry tree, any lookup table entries that have their - * refcnt decremented to 0, and the security data. */ + /* Free the dentry tree, any lookup table entries that have their refcnt + * decremented to 0, and the security data. */ destroy_image_metadata(&w->image_metadata[image - 1], w->lookup_table); /* Get rid of the empty slot in the image metadata array. */ memmove(&w->image_metadata[image - 1], &w->image_metadata[image], - (w->hdr.image_count - image) * sizeof(struct image_metadata)); + (w->hdr.image_count - image) * sizeof(struct wim_image_metadata)); /* Decrement the image count. */ if (--w->hdr.image_count == 0) { @@ -87,6 +87,6 @@ WIMLIBAPI int wimlib_delete_image(WIMStruct *w, int image) /* Remove the image from the XML information. */ xml_delete_image(&w->wim_info, image); - w->deletion_occurred = true; + w->deletion_occurred = 1; return 0; }