aboutsummaryrefslogtreecommitdiff
path: root/www/mohawk/files/patch-main.c
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2020-03-30 06:11:25 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2020-03-30 06:11:25 +0000
commit36f0c6d8c84b5c773df169f59b8edf9205ca9ec8 (patch)
treec88f8022c493bbb528555ad019ec14392c81573e /www/mohawk/files/patch-main.c
parent475cd433e7a1743f31d4c5a5c28dc30047371baf (diff)
downloadports-36f0c6d8c84b5c773df169f59b8edf9205ca9ec8.tar.gz
ports-36f0c6d8c84b5c773df169f59b8edf9205ca9ec8.zip
www/mohawk: Fix build with Clang 10
main.c:387:2: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] if (network->not) ^ http://beefy18.nyi.freebsd.org/data/head-amd64-default/p529299_s359382/logs/errors/mohawk-2.0.20.log
Notes
Notes: svn path=/head/; revision=529863
Diffstat (limited to 'www/mohawk/files/patch-main.c')
-rw-r--r--www/mohawk/files/patch-main.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/www/mohawk/files/patch-main.c b/www/mohawk/files/patch-main.c
new file mode 100644
index 000000000000..8d3baeb0b747
--- /dev/null
+++ b/www/mohawk/files/patch-main.c
@@ -0,0 +1,29 @@
+main.c:387:2: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
+ if (network->not)
+ ^
+
+--- main.c.orig 2020-03-22 05:37:24 UTC
++++ main.c
+@@ -384,9 +384,7 @@ access_granted_inet(struct addrinfo *ai, struct mohawk
+ if ((sa->sin_addr.s_addr & network->mask) != network->prefix)
+ return -1;
+
+- if (network->not)
+- return 0;
+- return 1;
++ return !network->not;
+ }
+
+ static inline int
+@@ -400,9 +398,8 @@ access_granted_inet6(struct addrinfo *ai, struct mohaw
+ if ((sa6->sin6_addr.s6_addr[i] & network->mask[i]) != network->prefix[i])
+ return -1;
+ }
+- if (network->not)
+- return 0;
+- return 1;
++
++ return !network->not;
+ }
+
+