Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Add some {} when the meaning is too ambiguous. From...



details:   https://anonhg.NetBSD.org/src/rev/83f665073530
branches:  trunk
changeset: 341113:83f665073530
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Oct 18 17:13:32 2015 +0000

description:
Add some {} when the meaning is too ambiguous. From Brainy.

diffstat:

 sys/arch/hppa/hppa/machdep.c  |  11 ++++++-----
 sys/arch/m68k/m68k/db_trace.c |   7 ++++---
 2 files changed, 10 insertions(+), 8 deletions(-)

diffs (68 lines):

diff -r 0ffd5ef57554 -r 83f665073530 sys/arch/hppa/hppa/machdep.c
--- a/sys/arch/hppa/hppa/machdep.c      Sun Oct 18 17:07:36 2015 +0000
+++ b/sys/arch/hppa/hppa/machdep.c      Sun Oct 18 17:13:32 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.5 2015/07/11 10:32:46 kamil Exp $        */
+/*     $NetBSD: machdep.c,v 1.6 2015/10/18 17:13:33 maxv Exp $ */
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.5 2015/07/11 10:32:46 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.6 2015/10/18 17:13:33 maxv Exp $");
 
 #include "opt_cputype.h"
 #include "opt_ddb.h"
@@ -981,10 +981,11 @@
                end = start + n * cpu_ticksnum / cpu_ticksdenom;
 
                /* N.B. Interval Timer may wrap around */
-               if (end < start)
-                       do
+               if (end < start) {
+                       do {
                                mfctl(CR_ITMR, start);
-                       while (start > end);
+                       } while (start > end);
+               }
 
                do
                        mfctl(CR_ITMR, start);
diff -r 0ffd5ef57554 -r 83f665073530 sys/arch/m68k/m68k/db_trace.c
--- a/sys/arch/m68k/m68k/db_trace.c     Sun Oct 18 17:07:36 2015 +0000
+++ b/sys/arch/m68k/m68k/db_trace.c     Sun Oct 18 17:13:32 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_trace.c,v 1.58 2013/11/07 01:49:46 christos Exp $   */
+/*     $NetBSD: db_trace.c,v 1.59 2015/10/18 17:13:32 maxv Exp $       */
 
 /* 
  * Mach Operating System
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.58 2013/11/07 01:49:46 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.59 2015/10/18 17:13:32 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -404,7 +404,7 @@
                const char *cp = modif;
                char c;
 
-               while ((c = *cp++) != 0)
+               while ((c = *cp++) != 0) {
                        if (c == 'a') {
                                lwpaddr = true;
                                trace_thread = true;
@@ -414,6 +414,7 @@
                        else if (c == 'u')
                                kernel_only = false;
 #endif
+               }
        }
 
        if (!have_addr)



Home | Main Index | Thread Index | Old Index