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:
Laslo Hunhold 2018-03-05 01:04:51 +01:00
parent 01ed0dac83
commit ed8b7e8954

4
main.c
View file

@ -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();
} }