diff options
author | Rob Landley <rob@landley.net> | 2019-08-23 10:33:47 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-08-23 10:33:47 -0500 |
commit | 06897a859d10f9de11354a6ead84dcacaa91a6ae (patch) | |
tree | 04a4b3b62aa4ad0775986a1e01bcb99ee91da083 | |
parent | 68757a5d54312d6ee47de471a57b4771f7c641ea (diff) | |
download | toybox-06897a859d10f9de11354a6ead84dcacaa91a6ae.tar.gz |
Trivial style fixes while I was looking at main anyway.
-rw-r--r-- | main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |