Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-projects commit in pax-utils: scanelf.c
Date: Tue, 27 Sep 2011 19:22:11
Message-Id: 20110927192156.BD26420036@flycatcher.gentoo.org
1 vapier 11/09/27 19:21:56
2
3 Modified: scanelf.c
4 Log:
5 simplify match_etype logic
6
7 Revision Changes Path
8 1.228 pax-utils/scanelf.c
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/scanelf.c?rev=1.228&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/scanelf.c?rev=1.228&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/scanelf.c?r1=1.227&r2=1.228
13
14 Index: scanelf.c
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v
17 retrieving revision 1.227
18 retrieving revision 1.228
19 diff -u -r1.227 -r1.228
20 --- scanelf.c 27 Sep 2011 19:20:51 -0000 1.227
21 +++ scanelf.c 27 Sep 2011 19:21:56 -0000 1.228
22 @@ -1,13 +1,13 @@
23 /*
24 * Copyright 2003-2007 Gentoo Foundation
25 * Distributed under the terms of the GNU General Public License v2
26 - * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.227 2011/09/27 19:20:51 vapier Exp $
27 + * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.228 2011/09/27 19:21:56 vapier Exp $
28 *
29 * Copyright 2003-2007 Ned Ludd - <solar@g.o>
30 * Copyright 2004-2007 Mike Frysinger - <vapier@g.o>
31 */
32
33 -static const char *rcsid = "$Id: scanelf.c,v 1.227 2011/09/27 19:20:51 vapier Exp $";
34 +static const char *rcsid = "$Id: scanelf.c,v 1.228 2011/09/27 19:21:56 vapier Exp $";
35 const char argv0[] = "scanelf";
36
37 #include "paxinc.h"
38 @@ -29,7 +29,7 @@
39 static int parseargs(int argc, char *argv[]);
40
41 /* variables to control behavior */
42 -static char match_etypes[126] = "";
43 +static char *match_etypes = NULL;
44 static array_t _ldpaths = array_init_decl, *ldpaths = &_ldpaths;
45 static char scan_ldpath = 0;
46 static char scan_envpath = 0;
47 @@ -1448,7 +1448,7 @@
48 break;
49 default: break;
50 }
51 - if (strlen(match_etypes)) {
52 + if (match_etypes) {
53 char sbuf[126];
54 strncpy(sbuf, match_etypes, sizeof(sbuf));
55 if (strchr(match_etypes, ',') != NULL) {
56 @@ -1915,7 +1915,7 @@
57 from_file = optarg;
58 break;
59 case 'E':
60 - strncpy(match_etypes, optarg, sizeof(match_etypes));
61 + match_etypes = optarg;
62 break;
63 case 'M':
64 match_bits = atoi(optarg);