From f23b1bc53484d6a63edc5595caf1ab8f354e1288 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 23 Mar 2021 18:36:37 +0100 Subject: [PATCH] BUILD: tools: fix build error with new PA_O_DEFAULT_DGRAM Previous commit 69ba35146 ("MINOR: tools: introduce new option PA_O_DEFAULT_DGRAM on str2sa_range.") managed to introduce a parenthesis imbalance that broke the build. No backport is needed. --- src/tools.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tools.c b/src/tools.c index 3f3460d3ea..98adb32266 100644 --- a/src/tools.c +++ b/src/tools.c @@ -910,9 +910,8 @@ struct sockaddr_storage *str2sa_range(const char *str, int *port, int *low, int memset(&ss, 0, sizeof(ss)); /* prepare the default socket types */ - if (((opts & (PA_O_STREAM|PA_O_DGRAM)) == PA_O_DGRAM)) - || (((opts & (PA_O_STREAM|PA_O_DGRAM)) == (PA_O_DGRAM|PA_O_STREAM)) - && (opts & PA_O_DEFAULT_DGRAM)) + if ((opts & (PA_O_STREAM|PA_O_DGRAM)) == PA_O_DGRAM || + ((opts & (PA_O_STREAM|PA_O_DGRAM)) == (PA_O_DGRAM|PA_O_STREAM) && (opts & PA_O_DEFAULT_DGRAM))) sock_type = ctrl_type = SOCK_DGRAM; else sock_type = ctrl_type = SOCK_STREAM;