aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toys/pending/dhcp.c2
-rw-r--r--toys/pending/dhcp6.c4
-rw-r--r--toys/pending/ip.c2
-rw-r--r--toys/pending/mdev.c6
-rw-r--r--toys/pending/modprobe.c15
-rw-r--r--toys/posix/xargs.c2
6 files changed, 15 insertions, 16 deletions
diff --git a/toys/pending/dhcp.c b/toys/pending/dhcp.c
index 25f9b913..d1f8e801 100644
--- a/toys/pending/dhcp.c
+++ b/toys/pending/dhcp.c
@@ -134,7 +134,7 @@ GLOBALS(
static void (*dbg)(char *format, ...);
static void dummy(char *format, ...){
- return;
+ return;
}
typedef struct dhcpc_result_s {
diff --git a/toys/pending/dhcp6.c b/toys/pending/dhcp6.c
index 755c1516..18aee8a3 100644
--- a/toys/pending/dhcp6.c
+++ b/toys/pending/dhcp6.c
@@ -254,8 +254,8 @@ static void mode_raw()
error_exit("MODE RAW : Bind fail.\n");
}
if (setsockopt(TT.sock, SOL_PACKET, PACKET_HOST,&constone, sizeof(int)) < 0) {
- if (errno != ENOPROTOOPT) error_exit("MODE RAW : Bind fail.\n");
- }
+ if (errno != ENOPROTOOPT) error_exit("MODE RAW : Bind fail.\n");
+ }
}
static void generate_transection_id()
diff --git a/toys/pending/ip.c b/toys/pending/ip.c
index 90f73308..68d4c2ca 100644
--- a/toys/pending/ip.c
+++ b/toys/pending/ip.c
@@ -1964,7 +1964,7 @@ static int route_update(char **argv, unsigned int route_flags)
char* ptr;
if (!*++argv) show_iproute_help();
metric = strtoul(*argv, &ptr, 0);
- if (!(!*ptr && metric <= 0xFFFFFFFFUL))
+ if (!(!*ptr && metric <= 0xFFFFFFFFUL))
error_exit("Invalid argument metric %s.",*argv);
else
res = metric;
diff --git a/toys/pending/mdev.c b/toys/pending/mdev.c
index d0bb0681..eb44d9d3 100644
--- a/toys/pending/mdev.c
+++ b/toys/pending/mdev.c
@@ -103,7 +103,7 @@ static void make_device(char *path)
for(end = pos; end-conf<len && *end!='\n'; end++);
// Four fields (last is optional): regex, uid:gid, mode [, name|path ]
- // For example: (sd[a-z])1 root:disk 660 =usb_storage_p1
+ // For example: (sd[a-z])1 root:disk 660 =usb_storage_p1
for (field = 4; field; field--) {
// Skip whitespace
while (pos<end && isspace(*pos)) pos++;
@@ -169,11 +169,11 @@ static void make_device(char *path)
{
char *beg_pos = pos;
mode = strtoul(pos, &pos, 8);
- if(pos == beg_pos) {
+ if (pos == beg_pos) {
// The line is bad because mode setting could not be
// converted to numeric value.
goto end_line;
- }
+ }
break;
}
// Try to look for name or path (optional field)
diff --git a/toys/pending/modprobe.c b/toys/pending/modprobe.c
index 923026ba..1d5479fd 100644
--- a/toys/pending/modprobe.c
+++ b/toys/pending/modprobe.c
@@ -66,7 +66,7 @@ static char *path2mod(char *file, char *mod)
if (!file) return NULL;
if (!mod) mod = xmalloc(MODNAME_LEN);
-
+
from = getbasename(file);
for (i = 0; i < (MODNAME_LEN-1) && from[i] && from[i] != '.'; i++)
@@ -375,8 +375,8 @@ static int ins_mod(char *modules, char *flags)
#ifdef __NR_finit_module
res = syscall(__NR_finit_module, fd, toybuf, 0);
if (!res || errno != ENOSYS) {
- xclose(fd);
- return res;
+ xclose(fd);
+ return res;
}
#endif
@@ -507,7 +507,7 @@ void modprobe_main(void)
if ((toys.optc < 1) && (((flags & FLAG_r) && (flags & FLAG_l))
||(!((flags & FLAG_r)||(flags & FLAG_l)))))
{
- help_exit("bad syntax");
+ help_exit("bad syntax");
}
// Check for -r flag without arg if yes then do auto remove.
if ((flags & FLAG_r) && !toys.optc) {
@@ -525,8 +525,7 @@ void modprobe_main(void)
if (flags & FLAG_l) {
for (dirs = TT.dirs; dirs; dirs = dirs->next) {
xchdir(dirs->arg);
- if (!depmode_read_entry(toys.optargs[0]))
- return;
+ if (!depmode_read_entry(toys.optargs[0])) return;
}
error_exit("no module found.");
}
@@ -563,8 +562,8 @@ void modprobe_main(void)
}
for (dirs = TT.dirs; dirs; dirs = dirs->next) {
- xchdir(dirs->arg);
- find_dep();
+ xchdir(dirs->arg);
+ find_dep();
}
while ((module = llist_popme(&TT.probes))) {
diff --git a/toys/posix/xargs.c b/toys/posix/xargs.c
index e23d14c4..9a3e9dae 100644
--- a/toys/posix/xargs.c
+++ b/toys/posix/xargs.c
@@ -186,7 +186,7 @@ void xargs_main(void)
for (i = 0; out[i]; ++i) fprintf(stderr, "%s ", out[i]);
if (FLAG(p)) {
fprintf(stderr, "?");
- doit = yesno(0);
+ doit = yesno(0);
} else fprintf(stderr, "\n");
}