Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Mar 2020 06:11:25 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r529863 - head/www/mohawk/files
Message-ID:  <202003300611.02U6BP3t046617@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Mon Mar 30 06:11:25 2020
New Revision: 529863
URL: https://svnweb.freebsd.org/changeset/ports/529863

Log:
  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

Added:
  head/www/mohawk/files/patch-main.c   (contents, props changed)

Added: head/www/mohawk/files/patch-main.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/mohawk/files/patch-main.c	Mon Mar 30 06:11:25 2020	(r529863)
@@ -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;
+ }
+ 
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202003300611.02U6BP3t046617>