Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Sep 2019 14:08:15 -0000
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r346568 - head/usr.bin/ar
Message-ID:  <201904221725.x3MHP0d2037062@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Mon Apr 22 17:25:00 2019
New Revision: 346568
URL: https://svnweb.freebsd.org/changeset/base/346568

Log:
  ar: test for writing 64-bit format only if symbol count is nonzero
  
  This is a minor simplification; if we do not have any symbols the empty
  symbol table can be in 32-bit format.
  
  MFC after:	1 week
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/usr.bin/ar/write.c

Modified: head/usr.bin/ar/write.c
==============================================================================
--- head/usr.bin/ar/write.c	Mon Apr 22 17:00:30 2019	(r346567)
+++ head/usr.bin/ar/write.c	Mon Apr 22 17:25:00 2019	(r346568)
@@ -656,10 +656,7 @@ write_objs(struct bsdar *bsdar)
 	 *
 	 * absolute_offset = htobe32(relative_offset + size_of_pseudo_members)
 	 */
-
 	w_sz = sizeof(uint32_t);
-	if (bsdar->s_so_max > UINT32_MAX)
-		w_sz = sizeof(uint64_t);
 	if (bsdar->s_cnt != 0) {
 		s_sz = (bsdar->s_cnt + 1) * sizeof(uint32_t) + bsdar->s_sn_sz;
 		pm_sz = _ARMAG_LEN + (_ARHDR_LEN + s_sz);





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904221725.x3MHP0d2037062>