From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1R8dEJ-00084e-0w for garchives@archives.gentoo.org; Tue, 27 Sep 2011 19:22:11 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BCF7521C2B7; Tue, 27 Sep 2011 19:21:58 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 8BCD621C2B7 for ; Tue, 27 Sep 2011 19:21:58 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 04BA31B4007 for ; Tue, 27 Sep 2011 19:21:58 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 559) id BD26420036; Tue, 27 Sep 2011 19:21:56 +0000 (UTC) From: "Mike Frysinger (vapier)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, vapier@gentoo.org Subject: [gentoo-commits] gentoo-projects commit in pax-utils: scanelf.c X-VCS-Repository: gentoo-projects X-VCS-Files: scanelf.c X-VCS-Directories: pax-utils X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger Content-Type: text/plain; charset=utf8 Message-Id: <20110927192156.BD26420036@flycatcher.gentoo.org> Date: Tue, 27 Sep 2011 19:21:56 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 53d8848aa5f68d4a9218b7e39c48a745 vapier 11/09/27 19:21:56 Modified: scanelf.c Log: simplify match_etype logic Revision Changes Path 1.228 pax-utils/scanelf.c file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/sca= nelf.c?rev=3D1.228&view=3Dmarkup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/sca= nelf.c?rev=3D1.228&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/sca= nelf.c?r1=3D1.227&r2=3D1.228 Index: scanelf.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v retrieving revision 1.227 retrieving revision 1.228 diff -u -r1.227 -r1.228 --- scanelf.c 27 Sep 2011 19:20:51 -0000 1.227 +++ scanelf.c 27 Sep 2011 19:21:56 -0000 1.228 @@ -1,13 +1,13 @@ /* * Copyright 2003-2007 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.227 201= 1/09/27 19:20:51 vapier Exp $ + * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.228 201= 1/09/27 19:21:56 vapier Exp $ * * Copyright 2003-2007 Ned Ludd - * Copyright 2004-2007 Mike Frysinger - */ =20 -static const char *rcsid =3D "$Id: scanelf.c,v 1.227 2011/09/27 19:20:51= vapier Exp $"; +static const char *rcsid =3D "$Id: scanelf.c,v 1.228 2011/09/27 19:21:56= vapier Exp $"; const char argv0[] =3D "scanelf"; =20 #include "paxinc.h" @@ -29,7 +29,7 @@ static int parseargs(int argc, char *argv[]); =20 /* variables to control behavior */ -static char match_etypes[126] =3D ""; +static char *match_etypes =3D NULL; static array_t _ldpaths =3D array_init_decl, *ldpaths =3D &_ldpaths; static char scan_ldpath =3D 0; static char scan_envpath =3D 0; @@ -1448,7 +1448,7 @@ break; default: break; } - if (strlen(match_etypes)) { + if (match_etypes) { char sbuf[126]; strncpy(sbuf, match_etypes, sizeof(sbuf)); if (strchr(match_etypes, ',') !=3D NULL) { @@ -1915,7 +1915,7 @@ from_file =3D optarg; break; case 'E': - strncpy(match_etypes, optarg, sizeof(match_etypes)); + match_etypes =3D optarg; break; case 'M': match_bits =3D atoi(optarg);