projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
A patch from Marc Karasek and Kanoj (kernel serial.c maintainer)
[oweals/busybox.git]
/
dirname.c
diff --git
a/dirname.c
b/dirname.c
index 7f191c1b9502d8694bd99bdb451720263e609dcf..935a8313c406d2e8ff646940a7c5ed6a2b954166 100644
(file)
--- a/
dirname.c
+++ b/
dirname.c
@@
-21,6
+21,8
@@
*
*/
+/* getopt not needed */
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@
-35,7
+37,7
@@
extern int dirname_main(int argc, char **argv)
argv++;
s=*argv+strlen(*argv)-1;
- while (s
!=
*argv && *s == '/') {
+ while (s
>
*argv && *s == '/') {
*s-- = '\0';
}
s = strrchr(*argv, '/');