summaryrefslogtreecommitdiff
path: root/testing/misc_tools.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-10-09 01:00:19 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-10-16 22:11:53 +0000
commit700accb3c78eb919d9c05eacad12cf3cbdb1a8a5 (patch)
tree4359ec7abf4b730d04fedb2d4f8956e1b3d3bcb1 /testing/misc_tools.c
parented9beef61c5713db6083a165f3c7d56d7f06186e (diff)
Use `bool` for IPv6 flag in test programs and `DHT_bootstrap`.
Diffstat (limited to 'testing/misc_tools.c')
-rw-r--r--testing/misc_tools.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/testing/misc_tools.c b/testing/misc_tools.c
index 8991a222..22fa0d0c 100644
--- a/testing/misc_tools.c
+++ b/testing/misc_tools.c
@@ -121,7 +121,7 @@ int tox_strncasecmp(const char *s1, const char *s2, size_t n)
121 return 0; 121 return 0;
122} 122}
123 123
124int cmdline_parsefor_ipv46(int argc, char **argv, uint8_t *ipv6enabled) 124int cmdline_parsefor_ipv46(int argc, char **argv, bool *ipv6enabled)
125{ 125{
126 int argvoffset = 0, argi; 126 int argvoffset = 0, argi;
127 127
@@ -131,9 +131,9 @@ int cmdline_parsefor_ipv46(int argc, char **argv, uint8_t *ipv6enabled)
131 char c = argv[argi][5]; 131 char c = argv[argi][5];
132 132
133 if (c == '4') { 133 if (c == '4') {
134 *ipv6enabled = 0; 134 *ipv6enabled = false;
135 } else if (c == '6') { 135 } else if (c == '6') {
136 *ipv6enabled = 1; 136 *ipv6enabled = true;
137 } else { 137 } else {
138 printf("Invalid argument: %s. Try --ipv4 or --ipv6!\n", argv[argi]); 138 printf("Invalid argument: %s. Try --ipv4 or --ipv6!\n", argv[argi]);
139 return -1; 139 return -1;