aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-08-23 10:33:47 -0500
committerRob Landley <rob@landley.net>2019-08-23 10:33:47 -0500
commit06897a859d10f9de11354a6ead84dcacaa91a6ae (patch)
tree04a4b3b62aa4ad0775986a1e01bcb99ee91da083 /main.c
parent68757a5d54312d6ee47de471a57b4771f7c641ea (diff)
downloadtoybox-06897a859d10f9de11354a6ead84dcacaa91a6ae.tar.gz
Trivial style fixes while I was looking at main anyway.
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.c b/main.c
index 9903b3c5..bc13ba22 100644
--- a/main.c
+++ b/main.c
@@ -39,7 +39,7 @@ struct toy_list *toy_find(char *name)
// If the name starts with "toybox" accept that as a match. Otherwise
// skip the first entry, which is out of order.
- if (!strncmp(name,"toybox",6)) return toy_list;
+ if (!strncmp(name, "toybox", 6)) return toy_list;
bottom = 1;
// Binary search to find this command.
@@ -49,7 +49,7 @@ struct toy_list *toy_find(char *name)
int result;
middle = (top+bottom)/2;
- if (middle<bottom || middle>top) return NULL;
+ if (middle<bottom || middle>top) return 0;
result = strcmp(name,toy_list[middle].name);
if (!result) return toy_list+middle;
if (result<0) top = --middle;