Module Name: src Committed By: rin Date: Mon Aug 28 00:01:37 UTC 2023
Modified Files: src/external/gpl3/binutils/dist/bfd: archive.c Log Message: binutils/bfd/archive.c: Reduce diff from upstream. NFC - Drop #if-0'ed code (more than 7 years disabled). - Make variable assignment similar to upstream. - Drop local style fix. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/binutils/dist/bfd/archive.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/gpl3/binutils/dist/bfd/archive.c diff -u src/external/gpl3/binutils/dist/bfd/archive.c:1.11 src/external/gpl3/binutils/dist/bfd/archive.c:1.12 --- src/external/gpl3/binutils/dist/bfd/archive.c:1.11 Sat Dec 24 20:17:04 2022 +++ src/external/gpl3/binutils/dist/bfd/archive.c Mon Aug 28 00:01:37 2023 @@ -847,16 +847,6 @@ bfd_generic_openr_next_archived_file (bf { filestart = last_file->proxy_origin; if (! bfd_is_thin_archive (archive)) -#if 0 -/* OLD CODE */ - filestart += size; - /* Pad to an even boundary... - Note that last_file->origin can be odd in the case of - BSD-4.4-style element with a long odd size. */ - if (!strncmp(arch_hdr (last_file)->ar_name, "#1/", 3)) - size += strlen(normalize(last_file, last_file->filename)); - filestart += size % 2; -#endif { bfd_size_type size = arelt_size (last_file); @@ -2227,13 +2217,13 @@ _bfd_write_archive_contents (bfd *arch) current = current->archive_next) { char buffer[DEFAULT_BUFFERSIZE]; - bfd_size_type saved_size = arelt_size (current); - bfd_size_type remaining = saved_size; + bfd_size_type remaining = arelt_size (current); + bfd_size_type saved_size = remaining; struct ar_hdr *hdr = arch_hdr (current); /* Write ar header. */ if (!_bfd_write_ar_hdr (arch, current)) - return false; + return false; /* Write filename if it is a 4.4BSD extended file, and add to size. */ if (!strncmp (hdr->ar_name, "#1/", 3)) {