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 17:28:29
Message-Id: 20110927172819.45DAA20036@flycatcher.gentoo.org
1 vapier 11/09/27 17:28:19
2
3 Modified: scanelf.c
4 Log:
5 constify the return of scanelf_file_{sections,sym}
6
7 Revision Changes Path
8 1.225 pax-utils/scanelf.c
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/scanelf.c?rev=1.225&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/scanelf.c?rev=1.225&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/scanelf.c?r1=1.224&r2=1.225
13
14 Index: scanelf.c
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v
17 retrieving revision 1.224
18 retrieving revision 1.225
19 diff -u -r1.224 -r1.225
20 --- scanelf.c 8 Aug 2011 01:56:16 -0000 1.224
21 +++ scanelf.c 27 Sep 2011 17:28:19 -0000 1.225
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.224 2011/08/08 01:56:16 vapier Exp $
27 + * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.225 2011/09/27 17:28:19 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.224 2011/08/08 01:56:16 vapier Exp $";
34 +static const char *rcsid = "$Id: scanelf.c,v 1.225 2011/09/27 17:28:19 vapier Exp $";
35 const char argv0[] = "scanelf";
36
37 #include "paxinc.h"
38 @@ -1146,7 +1146,7 @@
39 next_sym[-1] = saved;
40 }
41
42 -static char *scanelf_file_sym(elfobj *elf, char *found_sym)
43 +static const char *scanelf_file_sym(elfobj *elf, char *found_sym)
44 {
45 unsigned long i;
46 char *ret;
47 @@ -1203,10 +1203,10 @@
48 if (be_quiet)
49 return NULL;
50 else
51 - return (char *)" - ";
52 + return " - ";
53 }
54
55 -static char *scanelf_file_sections(elfobj *elf, char *found_section)
56 +static const char *scanelf_file_sections(elfobj *elf, char *found_section)
57 {
58 if (!find_section)
59 return NULL;
60 @@ -1232,7 +1232,7 @@
61 if (be_quiet)
62 return NULL;
63 else
64 - return (char *)" - ";
65 + return " - ";
66 }
67
68 /* scan an elf file and show all the fun stuff */