Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/indent indent: remove redundant parentheses around r...



details:   https://anonhg.NetBSD.org/src/rev/80155af69871
branches:  trunk
changeset: 953397:80155af69871
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Mar 07 20:47:13 2021 +0000

description:
indent: remove redundant parentheses around return value

No functional change.

diffstat:

 usr.bin/indent/args.c |   8 ++++----
 usr.bin/indent/io.c   |  12 ++++++------
 usr.bin/indent/lexi.c |   6 +++---
 3 files changed, 13 insertions(+), 13 deletions(-)

diffs (109 lines):

diff -r 23ed46301b4b -r 80155af69871 usr.bin/indent/args.c
--- a/usr.bin/indent/args.c     Sun Mar 07 20:40:18 2021 +0000
+++ b/usr.bin/indent/args.c     Sun Mar 07 20:47:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: args.c,v 1.15 2021/03/07 10:42:48 rillig Exp $ */
+/*     $NetBSD: args.c,v 1.16 2021/03/07 20:47:13 rillig Exp $ */
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -46,7 +46,7 @@
 #include <sys/cdefs.h>
 #ifndef lint
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: args.c,v 1.15 2021/03/07 10:42:48 rillig Exp $");
+__RCSID("$NetBSD: args.c,v 1.16 2021/03/07 20:47:13 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/args.c 336318 2018-07-15 21:04:21Z pstef $");
 #endif
@@ -246,9 +246,9 @@
 {
     while (*s1) {
        if (*s1++ != *s2++)
-           return (NULL);
+           return NULL;
     }
-    return (s2);
+    return s2;
 }
 
 /*
diff -r 23ed46301b4b -r 80155af69871 usr.bin/indent/io.c
--- a/usr.bin/indent/io.c       Sun Mar 07 20:40:18 2021 +0000
+++ b/usr.bin/indent/io.c       Sun Mar 07 20:47:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: io.c,v 1.22 2021/03/07 10:42:48 rillig Exp $   */
+/*     $NetBSD: io.c,v 1.23 2021/03/07 20:47:13 rillig Exp $   */
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -46,7 +46,7 @@
 #include <sys/cdefs.h>
 #ifndef lint
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: io.c,v 1.22 2021/03/07 10:42:48 rillig Exp $");
+__RCSID("$NetBSD: io.c,v 1.23 2021/03/07 20:47:13 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/io.c 334927 2018-06-10 16:44:18Z pstef $");
 #endif
@@ -409,7 +409,7 @@
     int curr;                  /* internal column pointer */
 
     if (current >= target)
-       return (current);       /* line is already long enough */
+       return current;         /* line is already long enough */
     curr = current;
     if (opt.use_tabs) {
        int tcur;
@@ -422,7 +422,7 @@
     while (curr++ < target)
        putc(' ', output);      /* pad with final blanks */
 
-    return (target);
+    return target;
 }
 
 /*
@@ -475,13 +475,13 @@
            break;
        }                       /* end of switch */
     }                          /* end of for loop */
-    return (cur);
+    return cur;
 }
 
 int
 count_spaces(int cur, char *buffer)
 {
-    return (count_spaces_until(cur, buffer, NULL));
+    return count_spaces_until(cur, buffer, NULL);
 }
 
 void
diff -r 23ed46301b4b -r 80155af69871 usr.bin/indent/lexi.c
--- a/usr.bin/indent/lexi.c     Sun Mar 07 20:40:18 2021 +0000
+++ b/usr.bin/indent/lexi.c     Sun Mar 07 20:47:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lexi.c,v 1.22 2021/03/07 20:40:18 rillig Exp $ */
+/*     $NetBSD: lexi.c,v 1.23 2021/03/07 20:47:13 rillig Exp $ */
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -46,7 +46,7 @@
 #include <sys/cdefs.h>
 #ifndef lint
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: lexi.c,v 1.22 2021/03/07 20:40:18 rillig Exp $");
+__RCSID("$NetBSD: lexi.c,v 1.23 2021/03/07 20:47:13 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/lexi.c 337862 2018-08-15 18:19:45Z pstef $");
 #endif
@@ -174,7 +174,7 @@
 static int
 strcmp_type(const void *e1, const void *e2)
 {
-    return (strcmp(e1, *(const char * const *)e2));
+    return strcmp(e1, *(const char *const *)e2);
 }
 
 #ifdef debug



Home | Main Index | Thread Index | Old Index