[hackers] [quark] Fix a logic error || Laslo Hunhold

From: <git_AT_suckless.org>
Date: Mon, 5 Mar 2018 01:05:11 +0100 (CET)

commit ed8b7e8954d302f73907f1cc302d124443f947aa
Author: Laslo Hunhold <dev_AT_frign.de>
AuthorDate: Mon Mar 5 01:04:51 2018 +0100
Commit: Laslo Hunhold <dev_AT_frign.de>
CommitDate: Mon Mar 5 01:04:51 2018 +0100

    Fix a logic error
    
    We want to xor s.host and udsname, so it especially errors out when none
    are given.

diff --git a/main.c b/main.c
index 1c7d285..bce74a0 100644
--- a/main.c
+++ b/main.c
_AT_@ -201,8 +201,8 @@ main(int argc, char *argv[])
                 usage();
         }
 
- /* allow either host or UNIX-domain socket, force port with host */
- if ((s.host && udsname) || (s.host && !s.port)) {
+ /* allow host xor UNIX-domain socket, force port with host */
+ if ((!s.host == !udsname) || (s.host && !s.port)) {
                 usage();
         }
 
Received on Mon Mar 05 2018 - 01:05:11 CET

This archive was generated by hypermail 2.3.0 : Mon Mar 05 2018 - 01:12:37 CET