From owner-svn-src-head@freebsd.org Sat Aug 6 15:10:15 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97325BAF7B0; Sat, 6 Aug 2016 15:10:15 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61AD81DE9; Sat, 6 Aug 2016 15:10:15 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u76FAERo049122; Sat, 6 Aug 2016 15:10:14 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u76FAEHo049121; Sat, 6 Aug 2016 15:10:14 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201608061510.u76FAEHo049121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 6 Aug 2016 15:10:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303797 - head/contrib/binutils/bfd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2016 15:10:15 -0000 Author: jhibbits Date: Sat Aug 6 15:10:14 2016 New Revision: 303797 URL: https://svnweb.freebsd.org/changeset/base/303797 Log: Check the first byte of the array for NUL, instead of the array as a NULL pointer The partition_name field is an array, so can never be NULL itself. Check only the first byte instead. This was found when test building with clang, but I'm not sure how it passes gcc's warnings either. Modified: head/contrib/binutils/bfd/ppcboot.c Modified: head/contrib/binutils/bfd/ppcboot.c ============================================================================== --- head/contrib/binutils/bfd/ppcboot.c Sat Aug 6 15:06:19 2016 (r303796) +++ head/contrib/binutils/bfd/ppcboot.c Sat Aug 6 15:10:14 2016 (r303797) @@ -419,7 +419,7 @@ ppcboot_bfd_print_private_bfd_data (abfd if (tdata->header.os_id) fprintf (f, "OS_ID = 0x%.2x\n", tdata->header.os_id); - if (tdata->header.partition_name) + if (tdata->header.partition_name[0]) fprintf (f, _("Partition name = \"%s\"\n"), tdata->header.partition_name); for (i = 0; i < 4; i++)