From 06897a859d10f9de11354a6ead84dcacaa91a6ae Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 23 Aug 2019 10:33:47 -0500 Subject: Trivial style fixes while I was looking at main anyway. --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main.c') 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 (middletop) return NULL; + if (middletop) return 0; result = strcmp(name,toy_list[middle].name); if (!result) return toy_list+middle; if (result<0) top = --middle; -- cgit v1.2.3