1 |
vapier 09/03/15 09:23:30 |
2 |
|
3 |
Modified: pspax.c |
4 |
Log: |
5 |
fixup warning about caps code -- caps_free() does not take a const |
6 |
|
7 |
Revision Changes Path |
8 |
1.45 pax-utils/pspax.c |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/pspax.c?rev=1.45&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/pspax.c?rev=1.45&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/pspax.c?r1=1.44&r2=1.45 |
13 |
|
14 |
Index: pspax.c |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-projects/pax-utils/pspax.c,v |
17 |
retrieving revision 1.44 |
18 |
retrieving revision 1.45 |
19 |
diff -u -r1.44 -r1.45 |
20 |
--- pspax.c 15 Mar 2009 08:51:42 -0000 1.44 |
21 |
+++ pspax.c 15 Mar 2009 09:23:30 -0000 1.45 |
22 |
@@ -12,7 +12,7 @@ |
23 |
* cc -o pspax pspax.c -DWANT_SYSCAP -lcap |
24 |
*/ |
25 |
|
26 |
-static const char *rcsid = "$Id: pspax.c,v 1.44 2009/03/15 08:51:42 vapier Exp $"; |
27 |
+static const char *rcsid = "$Id: pspax.c,v 1.45 2009/03/15 09:23:30 vapier Exp $"; |
28 |
const char * const argv0 = "pspax"; |
29 |
|
30 |
#include "paxinc.h" |
31 |
@@ -298,13 +298,12 @@ |
32 |
int have_attr, have_addr, wx; |
33 |
struct passwd *pwd; |
34 |
struct stat st; |
35 |
- const char *pax, *type, *name, *caps, *attr, *addr; |
36 |
- WRAP_SYSCAP(ssize_t length; cap_t cap_d;); |
37 |
+ const char *pax, *type, *name, *attr, *addr; |
38 |
+ char *caps; |
39 |
+ WRAP_SYSCAP(ssize_t length; cap_t cap_d;) |
40 |
|
41 |
WRAP_SYSCAP(cap_d = cap_init()); |
42 |
|
43 |
- caps = NULL; |
44 |
- |
45 |
dir = opendir(PROC_DIR); |
46 |
if (dir == NULL || chdir(PROC_DIR)) |
47 |
errp(PROC_DIR); |
48 |
@@ -365,6 +364,7 @@ |
49 |
continue; |
50 |
|
51 |
/* this is a non-POSIX function */ |
52 |
+ caps = NULL; |
53 |
WRAP_SYSCAP(capgetp(pid, cap_d)); |
54 |
WRAP_SYSCAP(caps = cap_to_text(cap_d, &length)); |