Mercurial > hg > toybox
diff toys/modinfo.c @ 632:6cafecf34728
Trivial cleanups.
author | Rob Landley <rob@landley.net> |
---|---|
date | Wed, 18 Jul 2012 21:10:57 -0500 |
parents | 312e4c3e00b1 |
children |
line wrap: on
line diff
--- a/toys/modinfo.c Wed Jul 18 20:28:19 2012 -0500 +++ b/toys/modinfo.c Wed Jul 18 21:10:57 2012 -0500 @@ -86,8 +86,7 @@ char **s; for (s = toys.optargs; *s; s++) { int len = strlen(*s); - if (strncmp(*s, new->name, len) == 0 && - strcmp(&new->name[len], ".ko") == 0) + if (!strncmp(*s, new->name, len) && !strcmp(new->name+len, ".ko")) modinfo_file(new); } } @@ -98,8 +97,7 @@ void modinfo_main(void) { struct utsname uts; - if (uname(&uts) < 0) - perror_exit("unable to determine uname"); + if (uname(&uts) < 0) perror_exit("bad uname"); sprintf(toybuf, "/lib/modules/%s", uts.release); dirtree_read(toybuf, check_module); }