summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorRon Yorston2016-04-03 22:29:35 +0200
committerDenys Vlasenko2016-04-03 22:29:35 +0200
commitb22061718db0111f9e7474f9b60aef02456ac070 (patch)
tree95d4fc9424e79c0557d3d695d7600dbab792f3c3 /libbb
parent6aab9928dec29855bcee21bce163e5fdf7144350 (diff)
downloadbusybox-b22061718db0111f9e7474f9b60aef02456ac070.zip
busybox-b22061718db0111f9e7474f9b60aef02456ac070.tar.gz
find_applet_by_name: loop index should be signed
The loop for (j = ARRAY_SIZE(applet_nameofs)-1; j >= 0; j--) { was intended to terminate when j goes negative, so j needs to be signed. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/appletlib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index d798a2e..de654f6 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -141,7 +141,8 @@ void FAST_FUNC bb_show_usage(void)
int FAST_FUNC find_applet_by_name(const char *name)
{
- unsigned i, j, max;
+ unsigned i, max;
+ int j;
const char *p;
/* The commented-out word-at-a-time code is ~40% faster, but +160 bytes.