Use stdbool.h things instead of ints for true/false args
This commit is contained in:
parent
fbc96d4b47
commit
8c9529a7ba
1 changed files with 10 additions and 10 deletions
|
@ -5,7 +5,7 @@
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
#include <math.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "clainsafecli.h"
|
#include "clainsafecli.h"
|
||||||
|
@ -16,10 +16,10 @@ main(int argc, char **argv)
|
||||||
struct curl_httppost *post = NULL;
|
struct curl_httppost *post = NULL;
|
||||||
struct curl_httppost *last = NULL;
|
struct curl_httppost *last = NULL;
|
||||||
|
|
||||||
int tor_flag, i2p_flag;
|
bool tor_flag, i2p_flag;
|
||||||
tor_flag = i2p_flag = 0;
|
tor_flag = i2p_flag = false;
|
||||||
int ipv6_flag, ipv4_flag;
|
bool ipv6_flag, ipv4_flag;
|
||||||
ipv6_flag = ipv4_flag = 0;
|
ipv6_flag = ipv4_flag = false;
|
||||||
|
|
||||||
long silent_flag = 0L;
|
long silent_flag = 0L;
|
||||||
char *buffer = (char *)calloc(1024,sizeof(char));
|
char *buffer = (char *)calloc(1024,sizeof(char));
|
||||||
|
@ -63,19 +63,19 @@ main(int argc, char **argv)
|
||||||
return 0;
|
return 0;
|
||||||
break;
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
tor_flag = 1;
|
tor_flag = true;
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
i2p_flag = 1;
|
i2p_flag = true;
|
||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
silent_flag = 1L;
|
silent_flag = true;
|
||||||
break;
|
break;
|
||||||
case '4':
|
case '4':
|
||||||
ipv4_flag = 1;
|
ipv4_flag = true;
|
||||||
break;
|
break;
|
||||||
case '6':
|
case '6':
|
||||||
ipv6_flag = 1;
|
ipv6_flag = true;
|
||||||
break;
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
print_usage();
|
print_usage();
|
||||||
|
|
Loading…
Add table
Reference in a new issue