aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;