Module Name:    src
Committed By:   rillig
Date:           Sat Jun 13 07:49:00 UTC 2020

Modified Files:
        src/usr.bin/make: str.c

Log Message:
usr.bin/make: remove redundant parentheses around return


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/usr.bin/make/str.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/str.c
diff -u src/usr.bin/make/str.c:1.44 src/usr.bin/make/str.c:1.45
--- src/usr.bin/make/str.c:1.44	Sat Jun 13 07:36:07 2020
+++ src/usr.bin/make/str.c	Sat Jun 13 07:48:59 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: str.c,v 1.44 2020/06/13 07:36:07 rillig Exp $	*/
+/*	$NetBSD: str.c,v 1.45 2020/06/13 07:48:59 rillig Exp $	*/
 
 /*-
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: str.c,v 1.44 2020/06/13 07:36:07 rillig Exp $";
+static char rcsid[] = "$NetBSD: str.c,v 1.45 2020/06/13 07:48:59 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char     sccsid[] = "@(#)str.c	5.8 (Berkeley) 6/1/90";
 #else
-__RCSID("$NetBSD: str.c,v 1.44 2020/06/13 07:36:07 rillig Exp $");
+__RCSID("$NetBSD: str.c,v 1.45 2020/06/13 07:48:59 rillig Exp $");
 #endif
 #endif				/* not lint */
 #endif
@@ -119,7 +119,7 @@ str_concat(const char *s1, const char *s
 	/* copy second string plus EOS into place */
 	memcpy(result + len1, s2, len2 + 1);
 
-	return(result);
+	return result;
 }
 
 /*-
@@ -344,9 +344,9 @@ Str_Match(const char *string, const char
 		 * pattern but not at the end of the string, we failed.
 		 */
 		if (*pattern == 0)
-			return(!*string);
+			return !*string;
 		if (*string == 0 && *pattern != '*')
-			return(0);
+			return 0;
 		/*
 		 * Check for a "*" as the next pattern character.  It matches
 		 * any substring.  We handle this by calling ourselves
@@ -356,13 +356,13 @@ Str_Match(const char *string, const char
 		if (*pattern == '*') {
 			pattern++;
 			if (*pattern == 0)
-				return(1);
+				return 1;
 			while (*string != 0) {
 				if (Str_Match(string, pattern))
-					return(1);
+					return 1;
 				++string;
 			}
-			return(0);
+			return 0;
 		}
 		/*
 		 * Check for a "?" as the next pattern character.  It matches
@@ -388,14 +388,14 @@ Str_Match(const char *string, const char
 				if ((*pattern == ']') || (*pattern == 0)) {
 					if (nomatch)
 						break;
-					return(0);
+					return 0;
 				}
 				if (*pattern == *string)
 					break;
 				if (pattern[1] == '-') {
 					c2 = pattern[2];
 					if (c2 == 0)
-						return(nomatch);
+						return nomatch;
 					if ((*pattern <= *string) &&
 					    (c2 >= *string))
 						break;
@@ -421,14 +421,14 @@ Str_Match(const char *string, const char
 		if (*pattern == '\\') {
 			++pattern;
 			if (*pattern == 0)
-				return(0);
+				return 0;
 		}
 		/*
 		 * There's no special character.  Just make sure that the
 		 * next characters of each string match.
 		 */
 		if (*pattern != *string)
-			return(0);
+			return 0;
 thisCharOK:	++pattern;
 		++string;
 	}

Reply via email to