Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make usr.bin/make: remove redundant parentheses arou...



details:   https://anonhg.NetBSD.org/src/rev/5550bc2b8ecd
branches:  trunk
changeset: 972886:5550bc2b8ecd
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Jun 13 07:48:59 2020 +0000

description:
usr.bin/make: remove redundant parentheses around return

diffstat:

 usr.bin/make/str.c |  26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diffs (98 lines):

diff -r bcf5b56d596c -r 5550bc2b8ecd usr.bin/make/str.c
--- a/usr.bin/make/str.c        Sat Jun 13 07:36:07 2020 +0000
+++ b/usr.bin/make/str.c        Sat Jun 13 07:48:59 2020 +0000
@@ -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 @@
        /* copy second string plus EOS into place */
        memcpy(result + len1, s2, len2 + 1);
 
-       return(result);
+       return result;
 }
 
 /*-
@@ -344,9 +344,9 @@
                 * 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 @@
                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 @@
                                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 @@
                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;
        }



Home | Main Index | Thread Index | Old Index