1 |
vapier 08/12/30 13:13:16 |
2 |
|
3 |
Modified: pspax.c scanelf.c scanmacho.c |
4 |
Log: |
5 |
drop excessive parenthesis |
6 |
|
7 |
Revision Changes Path |
8 |
1.42 pax-utils/pspax.c |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/pspax.c?rev=1.42&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/pspax.c?rev=1.42&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/pspax.c?r1=1.41&r2=1.42 |
13 |
|
14 |
Index: pspax.c |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-projects/pax-utils/pspax.c,v |
17 |
retrieving revision 1.41 |
18 |
retrieving revision 1.42 |
19 |
diff -u -r1.41 -r1.42 |
20 |
--- pspax.c 20 Mar 2008 19:08:16 -0000 1.41 |
21 |
+++ pspax.c 30 Dec 2008 13:13:15 -0000 1.42 |
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.41 2008/03/20 19:08:16 solar Exp $"; |
27 |
+static const char *rcsid = "$Id: pspax.c,v 1.42 2008/12/30 13:13:15 vapier Exp $"; |
28 |
const char * const argv0 = "pspax"; |
29 |
|
30 |
#include "paxinc.h" |
31 |
@@ -151,7 +151,7 @@ |
32 |
|
33 |
snprintf(str, sizeof(str), PROC_DIR "/%u/stat", pid); |
34 |
|
35 |
- if ((stat(str, &st)) != (-1)) |
36 |
+ if (stat(str, &st) != -1) |
37 |
if ((pwd = getpwuid(st.st_uid)) != NULL) |
38 |
return pwd; |
39 |
return NULL; |
40 |
@@ -306,12 +306,12 @@ |
41 |
exit(EXIT_FAILURE); |
42 |
} |
43 |
|
44 |
- if (access("/proc/self/attr/current", R_OK) != (-1)) |
45 |
+ if (access("/proc/self/attr/current", R_OK) != -1) |
46 |
have_attr = 1; |
47 |
else |
48 |
have_attr = 0; |
49 |
|
50 |
- if ((access("/proc/self/ipaddr", R_OK) != (-1)) && show_addr) |
51 |
+ if ((access("/proc/self/ipaddr", R_OK) != -1) && show_addr) |
52 |
have_addr = 1; |
53 |
else |
54 |
have_addr = 0; |
55 |
@@ -328,11 +328,12 @@ |
56 |
pid = (pid_t) atoi((char *) basename((char *) de->d_name)); |
57 |
if (find_name && pid) { |
58 |
char *str = get_proc_name(pid); |
59 |
- if (!str) continue; |
60 |
+ if (!str) |
61 |
+ continue; |
62 |
if (strcmp(str, find_name) != 0) |
63 |
pid = 0; |
64 |
} |
65 |
- if (((ppid > 0) && (pid != ppid)) || (!pid)) |
66 |
+ if (((ppid > 0) && (pid != ppid)) || !pid) |
67 |
continue; |
68 |
|
69 |
wx = get_proc_maps(pid); |
70 |
@@ -341,7 +342,7 @@ |
71 |
if ((wx == 1) && (writeexec != wx)) |
72 |
goto next_pid; |
73 |
|
74 |
- if ((wx == 0) && (writeexec)) |
75 |
+ if ((wx == 0) && writeexec) |
76 |
goto next_pid; |
77 |
} |
78 |
|
79 |
@@ -352,11 +353,11 @@ |
80 |
attr = (have_attr ? get_pid_attr(pid) : NULL); |
81 |
addr = (have_addr ? get_pid_addr(pid) : NULL); |
82 |
|
83 |
- if (show_uid != (-1) && pwd) |
84 |
+ if (show_uid != -1 && pwd) |
85 |
if (pwd->pw_uid != show_uid) |
86 |
continue; |
87 |
|
88 |
- if (show_gid != (-1) && pwd) |
89 |
+ if (show_gid != -1 && pwd) |
90 |
if (pwd->pw_gid != show_gid) |
91 |
continue; |
92 |
|
93 |
@@ -383,7 +384,7 @@ |
94 |
print_executable_mappings(pid); |
95 |
} |
96 |
|
97 |
- WRAP_SYSCAP(if (caps) cap_free((void *)caps)); |
98 |
+ WRAP_SYSCAP(if (caps) cap_free(caps)); |
99 |
|
100 |
next_pid: |
101 |
continue; |
102 |
|
103 |
|
104 |
|
105 |
1.205 pax-utils/scanelf.c |
106 |
|
107 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/scanelf.c?rev=1.205&view=markup |
108 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/scanelf.c?rev=1.205&content-type=text/plain |
109 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/scanelf.c?r1=1.204&r2=1.205 |
110 |
|
111 |
Index: scanelf.c |
112 |
=================================================================== |
113 |
RCS file: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v |
114 |
retrieving revision 1.204 |
115 |
retrieving revision 1.205 |
116 |
diff -u -r1.204 -r1.205 |
117 |
--- scanelf.c 30 Dec 2008 13:09:20 -0000 1.204 |
118 |
+++ scanelf.c 30 Dec 2008 13:13:15 -0000 1.205 |
119 |
@@ -1,13 +1,13 @@ |
120 |
/* |
121 |
* Copyright 2003-2007 Gentoo Foundation |
122 |
* Distributed under the terms of the GNU General Public License v2 |
123 |
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.204 2008/12/30 13:09:20 vapier Exp $ |
124 |
+ * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.205 2008/12/30 13:13:15 vapier Exp $ |
125 |
* |
126 |
* Copyright 2003-2007 Ned Ludd - <solar@g.o> |
127 |
* Copyright 2004-2007 Mike Frysinger - <vapier@g.o> |
128 |
*/ |
129 |
|
130 |
-static const char *rcsid = "$Id: scanelf.c,v 1.204 2008/12/30 13:09:20 vapier Exp $"; |
131 |
+static const char *rcsid = "$Id: scanelf.c,v 1.205 2008/12/30 13:13:15 vapier Exp $"; |
132 |
const char * const argv0 = "scanelf"; |
133 |
|
134 |
#include "paxinc.h" |
135 |
@@ -105,7 +105,7 @@ |
136 |
while ((p = strrchr(path, ':')) != NULL) { |
137 |
snprintf(fullpath, sizeof(fullpath), "%s/%s", p + 1, fname); |
138 |
*p = 0; |
139 |
- if (access(fullpath, R_OK) != (-1)) { |
140 |
+ if (access(fullpath, R_OK) != -1) { |
141 |
free(path); |
142 |
return fullpath; |
143 |
} |
144 |
@@ -1762,7 +1762,7 @@ |
145 |
} |
146 |
break; |
147 |
case 'O': |
148 |
- if (sscanf(optarg, "%o", &match_perms) == (-1)) |
149 |
+ if (sscanf(optarg, "%o", &match_perms) == -1) |
150 |
match_bits = 0; |
151 |
break; |
152 |
case 'o': { |
153 |
|
154 |
|
155 |
|
156 |
1.11 pax-utils/scanmacho.c |
157 |
|
158 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/scanmacho.c?rev=1.11&view=markup |
159 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/scanmacho.c?rev=1.11&content-type=text/plain |
160 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/scanmacho.c?r1=1.10&r2=1.11 |
161 |
|
162 |
Index: scanmacho.c |
163 |
=================================================================== |
164 |
RCS file: /var/cvsroot/gentoo-projects/pax-utils/scanmacho.c,v |
165 |
retrieving revision 1.10 |
166 |
retrieving revision 1.11 |
167 |
diff -u -r1.10 -r1.11 |
168 |
--- scanmacho.c 30 Dec 2008 13:09:20 -0000 1.10 |
169 |
+++ scanmacho.c 30 Dec 2008 13:13:15 -0000 1.11 |
170 |
@@ -1,7 +1,7 @@ |
171 |
/* |
172 |
* Copyright 2008 Gentoo Foundation |
173 |
* Distributed under the terms of the GNU General Public License v2 |
174 |
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanmacho.c,v 1.10 2008/12/30 13:09:20 vapier Exp $ |
175 |
+ * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanmacho.c,v 1.11 2008/12/30 13:13:15 vapier Exp $ |
176 |
* |
177 |
* based on scanelf by: |
178 |
* Copyright 2003-2007 Ned Ludd - <solar@g.o> |
179 |
@@ -10,7 +10,7 @@ |
180 |
* 2008 Fabian Groffen - <grobian@g.o> |
181 |
*/ |
182 |
|
183 |
-static const char *rcsid = "$Id: scanmacho.c,v 1.10 2008/12/30 13:09:20 vapier Exp $"; |
184 |
+static const char *rcsid = "$Id: scanmacho.c,v 1.11 2008/12/30 13:13:15 vapier Exp $"; |
185 |
const char * const argv0 = "scanmacho"; |
186 |
|
187 |
#include "paxinc.h" |
188 |
@@ -644,7 +644,7 @@ |
189 |
match_bits = atoi(optarg); |
190 |
break; |
191 |
case 'O': |
192 |
- if (sscanf(optarg, "%o", &match_perms) == (-1)) |
193 |
+ if (sscanf(optarg, "%o", &match_perms) == -1) |
194 |
match_bits = 0; |
195 |
break; |
196 |
case 'o': { |