summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/appletlib.c3
-rw-r--r--libbb/lineedit.c7
2 files changed, 5 insertions, 5 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index de654f6..b682e6b 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -791,7 +791,8 @@ static int busybox_main(char **argv)
full_write2_str(a);
full_write2_str("\n");
i++;
- a += strlen(a) + 1;
+ while (*a++ != '\0')
+ continue;
}
return 0;
}
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 2ddb2b6..3e62f46 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -779,12 +779,11 @@ static NOINLINE unsigned complete_cmd_dir_file(const char *command, int type)
if (type == FIND_EXE_ONLY) {
const char *p = applet_names;
- i = 0;
- while (i < NUM_APPLETS) {
+ while (*p) {
if (strncmp(pfind, p, pf_len) == 0)
add_match(xstrdup(p));
- p += strlen(p) + 1;
- i++;
+ while (*p++ != '\0')
+ continue;
}
}
#endif