mirror of
https://github.com/sheumann/hush.git
synced 2024-12-23 05:29:58 +00:00
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>
This commit is contained in:
parent
6aab9928de
commit
b22061718d
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user