X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fintegrity.c;h=fd656a4e272f1c908dffb522e91884a7da435500;hp=1998f6c5db41c778b47ccdc26e927205c0f44c18;hb=00a775dc256d1fc8254d4f055e362e67f25b66d8;hpb=9c0a80425e0d223b7e02256697ce7463317c03e8 diff --git a/src/integrity.c b/src/integrity.c index 1998f6c5..fd656a4e 100644 --- a/src/integrity.c +++ b/src/integrity.c @@ -504,7 +504,7 @@ verify_integrity(int in_fd, const tchar *filename, * ~10 MiB chunks of the WIM match up with the values given in the integrity * table. * - * @w: + * @wim: * The WIM, opened for reading, and with the header already read. * * @progress_func @@ -520,20 +520,20 @@ verify_integrity(int in_fd, const tchar *filename, * information. */ int -check_wim_integrity(WIMStruct *w, wimlib_progress_func_t progress_func) +check_wim_integrity(WIMStruct *wim, wimlib_progress_func_t progress_func) { int ret; u64 bytes_to_check; struct integrity_table *table; u64 end_lookup_table_offset; - if (w->hdr.integrity.offset == 0) { + if (wim->hdr.integrity.offset == 0) { DEBUG("No integrity information."); return WIM_INTEGRITY_NONEXISTENT; } - end_lookup_table_offset = w->hdr.lookup_table_res_entry.offset + - w->hdr.lookup_table_res_entry.size; + end_lookup_table_offset = wim->hdr.lookup_table_res_entry.offset + + wim->hdr.lookup_table_res_entry.size; if (end_lookup_table_offset < WIM_HEADER_DISK_SIZE) { ERROR("WIM lookup table ends before WIM header ends!"); @@ -542,11 +542,11 @@ check_wim_integrity(WIMStruct *w, wimlib_progress_func_t progress_func) bytes_to_check = end_lookup_table_offset - WIM_HEADER_DISK_SIZE; - ret = read_integrity_table(&w->hdr.integrity, w->in_fd, + ret = read_integrity_table(&wim->hdr.integrity, wim->in_fd, bytes_to_check, &table); if (ret) return ret; - ret = verify_integrity(w->in_fd, w->filename, table, + ret = verify_integrity(wim->in_fd, wim->filename, table, bytes_to_check, progress_func); FREE(table); return ret;