diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-05-29 12:10:23 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-05-29 12:10:23 +0000 |
commit | d2c306e862abf49dd4b1ff1d1bd1a789317b7905 (patch) | |
tree | ea8e439001256f7f6da7683399115d009552d777 /coreutils/ls.c | |
parent | 1ec5b2905484b7904aabb01f56c70265fb538c82 (diff) | |
download | busybox-w32-d2c306e862abf49dd4b1ff1d1bd1a789317b7905.tar.gz busybox-w32-d2c306e862abf49dd4b1ff1d1bd1a789317b7905.tar.bz2 busybox-w32-d2c306e862abf49dd4b1ff1d1bd1a789317b7905.zip |
- ls: remove unused variable
- dpkg.c, diff: use xstat
text data bss dec hex filename
848823 9100 645216 1503139 16efa3 busybox_old
848679 9100 645216 1502995 16ef13 busybox_unstripped
bloatcheck is completely useless as it sees -79 for this, which is bogus.
Diffstat (limited to 'coreutils/ls.c')
-rw-r--r-- | coreutils/ls.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c index 3fe0c8dad..9c0e8f17d 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
@@ -208,18 +208,15 @@ static struct dnode *my_stat(char *fullname, char *name) | |||
208 | #ifdef CONFIG_SELINUX | 208 | #ifdef CONFIG_SELINUX |
209 | security_context_t sid=NULL; | 209 | security_context_t sid=NULL; |
210 | #endif | 210 | #endif |
211 | int rc; | ||
212 | 211 | ||
213 | #ifdef CONFIG_FEATURE_LS_FOLLOWLINKS | 212 | #ifdef CONFIG_FEATURE_LS_FOLLOWLINKS |
214 | if (all_fmt & FOLLOW_LINKS) { | 213 | if (all_fmt & FOLLOW_LINKS) { |
215 | #ifdef CONFIG_SELINUX | 214 | #ifdef CONFIG_SELINUX |
216 | if (is_selinux_enabled()) { | 215 | if (is_selinux_enabled()) { |
217 | rc=0; /* Set the number which means success before hand. */ | 216 | getfilecon(fullname,&sid); |
218 | rc = getfilecon(fullname,&sid); | ||
219 | } | 217 | } |
220 | #endif | 218 | #endif |
221 | rc = stat(fullname, &dstat); | 219 | if (stat(fullname, &dstat)) { |
222 | if(rc) { | ||
223 | bb_perror_msg("%s", fullname); | 220 | bb_perror_msg("%s", fullname); |
224 | status = EXIT_FAILURE; | 221 | status = EXIT_FAILURE; |
225 | return 0; | 222 | return 0; |
@@ -229,12 +226,10 @@ static struct dnode *my_stat(char *fullname, char *name) | |||
229 | { | 226 | { |
230 | #ifdef CONFIG_SELINUX | 227 | #ifdef CONFIG_SELINUX |
231 | if (is_selinux_enabled()) { | 228 | if (is_selinux_enabled()) { |
232 | rc=0; /* Set the number which means success before hand. */ | 229 | lgetfilecon(fullname,&sid); |
233 | rc = lgetfilecon(fullname,&sid); | ||
234 | } | 230 | } |
235 | #endif | 231 | #endif |
236 | rc = lstat(fullname, &dstat); | 232 | if (lstat(fullname, &dstat)) { |
237 | if(rc) { | ||
238 | bb_perror_msg("%s", fullname); | 233 | bb_perror_msg("%s", fullname); |
239 | status = EXIT_FAILURE; | 234 | status = EXIT_FAILURE; |
240 | return 0; | 235 | return 0; |