From 2c1cf4a02783e2a570ddf7b7ea968c7bed781f91 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 18 Jan 2015 14:06:14 -0600 Subject: Remove trailing whitespace. --- lib/args.c | 1 - lib/lib.c | 2 +- lib/password.c | 8 ++++---- lib/xwrap.c | 4 ++-- main.c | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/args.c b/lib/args.c index b385dd48..592d33c8 100644 --- a/lib/args.c +++ b/lib/args.c @@ -82,7 +82,6 @@ // + Synonyms (switch on all) [+abc] means -ab=-abc, -c=-abc // ! More than one in group is error [!abc] means -ab calls error_exit() // primarily useful if you can switch things back off again. -// // Notes from getopt man page // - and -- cannot be arguments. diff --git a/lib/lib.c b/lib/lib.c index 808c149a..f70d379c 100644 --- a/lib/lib.c +++ b/lib/lib.c @@ -155,7 +155,7 @@ int mkpathat(int atfd, char *dir, mode_t lastmode, int flags) if (!(flags&2) || errno != EEXIST) return 1; } else if (flags&4) fprintf(stderr, "%s: created directory '%s'\n", toys.which->name, dir); - + if (!(*s = save)) break; } diff --git a/lib/password.c b/lib/password.c index 985bd573..b3cc199e 100644 --- a/lib/password.c +++ b/lib/password.c @@ -8,7 +8,7 @@ // generate appropriate random salt string for given encryption algorithm. int get_salt(char *salt, char *algo) -{ +{ struct { char *type, id, len; } al[] = {{"des", 0, 2}, {"md5", 1, 8}, {"sha256", 5, 16}, {"sha512", 6, 16}}; @@ -128,9 +128,9 @@ static char *get_nextcolon(char *line, int cnt) } /*update_password is used by multiple utilities to update /etc/passwd, - * /etc/shadow, /etc/group and /etc/gshadow files, + * /etc/shadow, /etc/group and /etc/gshadow files, * which are used as user, group databeses - * entry can be + * entry can be * 1. encrypted password, when updating user password. * 2. complete entry for user details, when creating new user * 3. group members comma',' separated list, when adding user to group @@ -197,7 +197,7 @@ int update_password(char *filename, char* username, char* entry) current_ptr = get_nextcolon(current_ptr, 1); fprintf(newfp, "%s\n",current_ptr); } else fprintf(newfp, "%s\n",current_ptr); - } else if (!strcmp(toys.which->name, "groupadd") || + } else if (!strcmp(toys.which->name, "groupadd") || !strcmp(toys.which->name, "addgroup") || !strcmp(toys.which->name, "delgroup") || !strcmp(toys.which->name, "groupdel")){ diff --git a/lib/xwrap.c b/lib/xwrap.c index de7ae832..bfe1c8e1 100644 --- a/lib/xwrap.c +++ b/lib/xwrap.c @@ -349,7 +349,7 @@ void xstat(char *path, struct stat *st) // Cannonicalize path, even to file with one or more missing components at end. // if exact, require last path component to exist -char *xabspath(char *path, int exact) +char *xabspath(char *path, int exact) { struct string_list *todo, *done = 0; int try = 9999, dirfd = open("/", 0);; @@ -610,7 +610,7 @@ long xparsetime(char *arg, long units, long *fraction) if (CFG_TOYBOX_FLOAT) d = strtod(arg, &arg); else l = strtoul(arg, &arg, 10); - + // Parse suffix if (*arg) { int ismhd[]={1,60,3600,86400}, i = stridx("smhd", *arg); diff --git a/main.c b/main.c index 6ca6c2d9..7f745490 100644 --- a/main.c +++ b/main.c @@ -152,7 +152,7 @@ void toybox_main(void) toys.optc = toys.recursion = 0; toy_exec(toys.argv+1); if (toys.argv[1][0] == '-') goto list; - + error_exit("Unknown command %s",toys.argv[1]); } -- cgit v1.2.3