diff options
author | irungentoo <irungentoo@gmail.com> | 2013-09-14 12:42:17 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-09-14 12:42:17 -0400 |
commit | 12d1c5199bd2feecd93424ff57f44fab4bbb02ad (patch) | |
tree | cd5a20e0c995199a383efd0a77ca0efb0033cfb6 /testing/misc_tools.c | |
parent | 64d000cdfaed710d3e22fa5444b8c2883b9f09d6 (diff) |
astyled everything.
Diffstat (limited to 'testing/misc_tools.c')
-rw-r--r-- | testing/misc_tools.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/testing/misc_tools.c b/testing/misc_tools.c index 824200d8..81f5ed8a 100644 --- a/testing/misc_tools.c +++ b/testing/misc_tools.c | |||
@@ -51,10 +51,12 @@ unsigned char *hex_string_to_bin(char hex_string[]) | |||
51 | int cmdline_parsefor_ipv46(int argc, char **argv, uint8_t *ipv6enabled) | 51 | int cmdline_parsefor_ipv46(int argc, char **argv, uint8_t *ipv6enabled) |
52 | { | 52 | { |
53 | int argvoffset = 0, argi; | 53 | int argvoffset = 0, argi; |
54 | for(argi = 1; argi < argc; argi++) | 54 | |
55 | for (argi = 1; argi < argc; argi++) | ||
55 | if (!strncasecmp(argv[argi], "--ipv", 5)) { | 56 | if (!strncasecmp(argv[argi], "--ipv", 5)) { |
56 | if (argv[argi][5] && !argv[argi][6]) { | 57 | if (argv[argi][5] && !argv[argi][6]) { |
57 | char c = argv[argi][5]; | 58 | char c = argv[argi][5]; |
59 | |||
58 | if (c == '4') | 60 | if (c == '4') |
59 | *ipv6enabled = 0; | 61 | *ipv6enabled = 0; |
60 | else if (c == '6') | 62 | else if (c == '6') |
@@ -63,8 +65,7 @@ int cmdline_parsefor_ipv46(int argc, char **argv, uint8_t *ipv6enabled) | |||
63 | printf("Invalid argument: %s. Try --ipv4 or --ipv6!\n", argv[argi]); | 65 | printf("Invalid argument: %s. Try --ipv4 or --ipv6!\n", argv[argi]); |
64 | return -1; | 66 | return -1; |
65 | } | 67 | } |
66 | } | 68 | } else { |
67 | else { | ||
68 | printf("Invalid argument: %s. Try --ipv4 or --ipv6!\n", argv[argi]); | 69 | printf("Invalid argument: %s. Try --ipv4 or --ipv6!\n", argv[argi]); |
69 | return -1; | 70 | return -1; |
70 | } | 71 | } |