Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/xlint/lint1 lint: remove redundant braces in doreturn



details:   https://anonhg.NetBSD.org/src/rev/41f828848309
branches:  trunk
changeset: 960562:41f828848309
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Mar 21 11:38:24 2021 +0000

description:
lint: remove redundant braces in doreturn

No functional change.

diffstat:

 usr.bin/xlint/lint1/func.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (32 lines):

diff -r 15e671fe0ed6 -r 41f828848309 usr.bin/xlint/lint1/func.c
--- a/usr.bin/xlint/lint1/func.c        Sun Mar 21 10:50:08 2021 +0000
+++ b/usr.bin/xlint/lint1/func.c        Sun Mar 21 11:38:24 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: func.c,v 1.81 2021/03/21 10:30:28 rillig Exp $ */
+/*     $NetBSD: func.c,v 1.82 2021/03/21 11:38:24 rillig Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: func.c,v 1.81 2021/03/21 10:30:28 rillig Exp $");
+__RCSID("$NetBSD: func.c,v 1.82 2021/03/21 11:38:24 rillig Exp $");
 #endif
 
 #include <stdlib.h>
@@ -1008,11 +1008,10 @@
        for (ci = cstmt; ci->c_surrounding != NULL; ci = ci->c_surrounding)
                continue;
 
-       if (tn != NULL) {
+       if (tn != NULL)
                ci->c_had_return_value = true;
-       } else {
+       else
                ci->c_had_return_noval = true;
-       }
 
        if (tn != NULL && funcsym->s_type->t_subt->t_tspec == VOID) {
                /* void function %s cannot return value */



Home | Main Index | Thread Index | Old Index