projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd6b211
)
hush: optimize type builtin a bit more
author
Denys Vlasenko
<vda.linux@googlemail.com>
Thu, 28 May 2009 07:58:43 +0000
(09:58 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Thu, 28 May 2009 07:58:43 +0000
(09:58 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/hush.c
patch
|
blob
|
history
diff --git
a/shell/hush.c
b/shell/hush.c
index 50009106659f7fefcf45fb3996afbd25dc1ba938..cda1c2e74f1a7c3f2900a7a6710806f6dbf18736 100644
(file)
--- a/
shell/hush.c
+++ b/
shell/hush.c
@@
-6785,15
+6785,14
@@
static int builtin_type(char **argv)
type = "a shell builtin";
else if ((path = find_in_path(*argv)) != NULL)
type = path;
-
- if (!type) {
+ else {
bb_error_msg("type: %s: not found", *argv);
ret = EXIT_FAILURE;
- } else
- printf("%s is %s\n", *argv, type);
+ continue;
+ }
- if (path)
-
free(path);
+ printf("%s is %s\n", *argv, type);
+ free(path);
}
return ret;