diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-04-10 15:43:37 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-04-10 15:43:37 +0000 |
commit | 99912ca733dd960f5589227fd999c86e73c8e894 (patch) | |
tree | 9df947fc08884d498cf76a02204d74b121064134 /coreutils/basename.c | |
parent | ff131b980d524a33d8a43cefe65e14f64a43f2da (diff) | |
download | busybox-w32-99912ca733dd960f5589227fd999c86e73c8e894.tar.gz busybox-w32-99912ca733dd960f5589227fd999c86e73c8e894.tar.bz2 busybox-w32-99912ca733dd960f5589227fd999c86e73c8e894.zip |
audit small applets and mark some of them as NOFORK.
Put big scary warnings in relevant places.
Diffstat (limited to 'coreutils/basename.c')
-rw-r--r-- | coreutils/basename.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/coreutils/basename.c b/coreutils/basename.c index 46f7122c8..f4307d6ce 100644 --- a/coreutils/basename.c +++ b/coreutils/basename.c | |||
@@ -20,11 +20,10 @@ | |||
20 | * 3) Save some space by using strcmp(). Calling strncmp() here was silly. | 20 | * 3) Save some space by using strcmp(). Calling strncmp() here was silly. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <stdlib.h> | ||
24 | #include <stdio.h> | ||
25 | #include <string.h> | ||
26 | #include "busybox.h" | 23 | #include "busybox.h" |
27 | 24 | ||
25 | /* This is a NOFORK applet. Be very careful! */ | ||
26 | |||
28 | int basename_main(int argc, char **argv); | 27 | int basename_main(int argc, char **argv); |
29 | int basename_main(int argc, char **argv) | 28 | int basename_main(int argc, char **argv) |
30 | { | 29 | { |
@@ -47,5 +46,5 @@ int basename_main(int argc, char **argv) | |||
47 | 46 | ||
48 | puts(s); | 47 | puts(s); |
49 | 48 | ||
50 | fflush_stdout_and_exit(EXIT_SUCCESS); | 49 | return fflush(stdout); |
51 | } | 50 | } |