shithub: drawterm

Download patch

ref: b0472fa6c7f5e5d50a966804197a3e40d41b4a9c
parent: 662540aee7223766e4499778102b48ff77a5a4ec
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Jan 6 14:21:59 EST 2023

libip: avoid some parentesis warnings from gcc

--- a/libip/parseip.c
+++ b/libip/parseip.c
@@ -40,7 +40,7 @@
 static int
 ipcharok(int c)
 {
-	return c == '.' || c == ':' || isascii(c) && isxdigit(c);
+	return c == '.' || c == ':' || (isascii(c) && isxdigit(c));
 }
 
 static int
@@ -48,7 +48,7 @@
 {
 	if(c == '\0')
 		return 1;
-	if(c == '.' || c == ':' || isascii(c) && isalnum(c))
+	if(c == '.' || c == ':' || (isascii(c) && isalnum(c)))
 		return 0;
 	return 1;
 }
@@ -83,7 +83,7 @@
 			break;
 		}
 		/* v6: at most 4 hex digits, followed by colon or delim */
-		if(x != (ushort)x || *p != ':' && !delimchar(*p)) {
+		if(x != (ushort)x || (*p != ':' && !delimchar(*p))) {
 			memset(to, 0, IPaddrlen);
 			return -1;			/* parse error */
 		}