projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove unnecessary parentheses from sizeof, apply sizeof to variables instead of...
[tinc]
/
src
/
tincctl.c
diff --git
a/src/tincctl.c
b/src/tincctl.c
index
567e1c3
..
7cfc62e
100644
(file)
--- a/
src/tincctl.c
+++ b/
src/tincctl.c
@@
-292,7
+292,7
@@
static void make_names(void) {
#ifdef HAVE_MINGW
HKEY key;
char installdir[1024] = "";
#ifdef HAVE_MINGW
HKEY key;
char installdir[1024] = "";
- long len = sizeof
(installdir)
;
+ long len = sizeof
installdir
;
#endif
if(netname)
#endif
if(netname)
@@
-360,7
+360,7
@@
static int send_ctl_request(int fd, enum request_type type,
tinc_ctl_request_t req;
int rv;
struct iovec vector[2] = {
tinc_ctl_request_t req;
int rv;
struct iovec vector[2] = {
- {&req, sizeof
(req)
},
+ {&req, sizeof
req
},
{(void*) outdata, outdatalen}
};
void *indata;
{(void*) outdata, outdatalen}
};
void *indata;
@@
-440,9
+440,7
@@
static int send_ctl_request_cooked(int fd, enum request_type type,
int main(int argc, char *argv[], char *envp[]) {
struct sockaddr_un addr;
tinc_ctl_greeting_t greeting;
int main(int argc, char *argv[], char *envp[]) {
struct sockaddr_un addr;
tinc_ctl_greeting_t greeting;
- tinc_ctl_request_t req;
int fd;
int fd;
- int len;
int result;
program_name = argv[0];
int result;
program_name = argv[0];
@@
-613,7
+611,7
@@
int main(int argc, char *argv[], char *envp[]) {
}
debuglevel = atoi(argv[optind+1]);
return send_ctl_request_cooked(fd, REQ_SET_DEBUG, &debuglevel,
}
debuglevel = atoi(argv[optind+1]);
return send_ctl_request_cooked(fd, REQ_SET_DEBUG, &debuglevel,
- sizeof
(debuglevel)
) != -1;
+ sizeof
debuglevel
) != -1;
}
if(!strcasecmp(argv[optind], "retry")) {
}
if(!strcasecmp(argv[optind], "retry")) {