aboutsummaryrefslogtreecommitdiff
path: root/findutils
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-12-23 15:58:11 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-12-23 15:58:11 +0000
commit9ac9e55e3c1dd11bf007623ea672f7569366c186 (patch)
tree7f3b46d7f2f01fed698b569b3217ab5b52413aac /findutils
parente13a537795751bee8e2b7fe2b88c75436acd9da0 (diff)
downloadbusybox-9ac9e55e3c1dd11bf007623ea672f7569366c186.tar.gz
sum: 40% size reduction (-300 bytes)
find: one_char -> LONE_CHAR
Diffstat (limited to 'findutils')
-rw-r--r--findutils/find.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/findutils/find.c b/findutils/find.c
index 38bbfbec9..fffa3cd5c 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -75,11 +75,6 @@ USE_DESKTOP( ACTS(prune))
static action ***actions;
static int need_print = 1;
-static inline int one_char(const char* str, char c)
-{
- return (str[0] == c && str[1] == '\0');
-}
-
static int count_subst(const char *str)
{
@@ -455,7 +450,7 @@ action*** parse_params(char **argv)
while (1) {
if (!*argv) /* did not see ';' till end */
bb_error_msg_and_die(bb_msg_requires_arg, arg);
- if (one_char(argv[0], ';'))
+ if (LONE_CHAR(argv[0], ';'))
break;
argv++;
ap->exec_argc++;
@@ -469,7 +464,7 @@ action*** parse_params(char **argv)
}
#endif
#if ENABLE_DESKTOP
- else if (one_char(arg, '(')) {
+ else if (LONE_CHAR(arg, '(')) {
action_paren *ap;
char **endarg;
int nested = 1;
@@ -478,9 +473,9 @@ action*** parse_params(char **argv)
while (1) {
if (!*++endarg)
bb_error_msg_and_die("unpaired '('");
- if (one_char(*endarg, '('))
+ if (LONE_CHAR(*endarg, '('))
nested++;
- else if (one_char(*endarg, ')') && !--nested) {
+ else if (LONE_CHAR(*endarg, ')') && !--nested) {
*endarg = NULL;
break;
}
@@ -522,7 +517,7 @@ int find_main(int argc, char **argv)
if (argv[firstopt][0] == '-')
break;
#if ENABLE_DESKTOP
- if (one_char(argv[firstopt], '('))
+ if (LONE_CHAR(argv[firstopt], '('))
break;
#endif
}