X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fjoin.c;h=cca44214041ab6c9fabefd269d59db95e7cfef8e;hb=d31b2fee211b1c31420bafe1c2379f6f89bd92fe;hp=3a60f1c9a6c4e632f5506f22ba91d4b16c54c51b;hpb=b5b9681794d1f5f13350e3567f6f6e74f5c779cf;p=wimlib diff --git a/src/join.c b/src/join.c index 3a60f1c9..cca44214 100644 --- a/src/join.c +++ b/src/join.c @@ -7,20 +7,18 @@ /* * Copyright (C) 2012, 2013 Eric Biggers * - * This file is part of wimlib, a library for working with WIM files. + * This file is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at your option) any + * later version. * - * wimlib is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free - * Software Foundation; either version 3 of the License, or (at your option) - * any later version. - * - * wimlib is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - * A PARTICULAR PURPOSE. See the GNU General Public License for more + * This file is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * - * You should have received a copy of the GNU General Public License - * along with wimlib; if not, see http://www.gnu.org/licenses/. + * You should have received a copy of the GNU Lesser General Public License + * along with this file; if not, see http://www.gnu.org/licenses/. */ #ifdef HAVE_CONFIG_H @@ -96,7 +94,7 @@ verify_swm_set(WIMStruct *wim, WIMStruct **additional_swms, * checked to be the same as wim->hdr.total_parts. Otherwise, it * could be unexpectedly high and cause a stack overflow. */ WIMStruct *parts_to_swms[num_additional_swms]; - ZERO_ARRAY(parts_to_swms); + memset(parts_to_swms, 0, sizeof(parts_to_swms)); for (unsigned i = 0; i < num_additional_swms; i++) { WIMStruct *swm = additional_swms[i]; @@ -112,7 +110,7 @@ verify_swm_set(WIMStruct *wim, WIMStruct **additional_swms, "chunk size"); return WIMLIB_ERR_SPLIT_INVALID; } - if (memcmp(guid, swm->hdr.guid, WIM_GUID_LEN) != 0) { + if (!guids_equal(guid, swm->hdr.guid)) { ERROR("The split WIMs do not all have the same " "GUID"); return WIMLIB_ERR_SPLIT_INVALID;