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: add braces around multi-line loop ...



details:   https://anonhg.NetBSD.org/src/rev/e0270f6630e1
branches:  trunk
changeset: 363488:e0270f6630e1
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Mar 13 15:26:54 2022 +0000

description:
lint: add braces around multi-line loop body

No functional change.

diffstat:

 usr.bin/xlint/lint1/tree.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 253060d7b5ca -r e0270f6630e1 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Sun Mar 13 15:23:38 2022 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Sun Mar 13 15:26:54 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tree.c,v 1.410 2022/02/27 18:29:14 rillig Exp $        */
+/*     $NetBSD: tree.c,v 1.411 2022/03/13 15:26:54 rillig Exp $        */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.410 2022/02/27 18:29:14 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.411 2022/03/13 15:26:54 rillig Exp $");
 #endif
 
 #include <float.h>
@@ -491,12 +491,13 @@
 {
        tnode_t *default_result = NULL;
 
-       for (; sel != NULL; sel = sel->ga_prev)
+       for (; sel != NULL; sel = sel->ga_prev) {
                if (expr != NULL &&
                    eqtype(sel->ga_arg, expr->tn_type, false, false, NULL))
                        return sel->ga_result;
                else if (sel->ga_arg == NULL)
                        default_result = sel->ga_result;
+       }
        return default_result;
 }
 



Home | Main Index | Thread Index | Old Index