Fix a logic error
We want to xor s.host and udsname, so it especially errors out when none are given.
This commit is contained in:
parent
01ed0dac83
commit
ed8b7e8954
1 changed files with 2 additions and 2 deletions
4
main.c
4
main.c
|
@ -201,8 +201,8 @@ main(int argc, char *argv[])
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* allow either host or UNIX-domain socket, force port with host */
|
/* allow host xor UNIX-domain socket, force port with host */
|
||||||
if ((s.host && udsname) || (s.host && !s.port)) {
|
if ((!s.host == !udsname) || (s.host && !s.port)) {
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue