Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Put some ()s in the macro (kre).



details:   https://anonhg.NetBSD.org/src/rev/62ed0a0fb268
branches:  trunk
changeset: 825167:62ed0a0fb268
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Jul 02 11:21:13 2017 +0000

description:
Put some ()s in the macro (kre).

diffstat:

 sys/arch/amd64/amd64/gdt.c |  9 ++++-----
 sys/arch/i386/i386/gdt.c   |  7 +++----
 2 files changed, 7 insertions(+), 9 deletions(-)

diffs (65 lines):

diff -r 8eee6827c140 -r 62ed0a0fb268 sys/arch/amd64/amd64/gdt.c
--- a/sys/arch/amd64/amd64/gdt.c        Sun Jul 02 11:16:50 2017 +0000
+++ b/sys/arch/amd64/amd64/gdt.c        Sun Jul 02 11:21:13 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gdt.c,v 1.39 2017/07/02 09:02:51 maxv Exp $    */
+/*     $NetBSD: gdt.c,v 1.40 2017/07/02 11:21:13 maxv Exp $    */
 
 /*-
  * Copyright (c) 1996, 1997, 2009 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.39 2017/07/02 09:02:51 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.40 2017/07/02 11:21:13 maxv Exp $");
 
 #include "opt_multiprocessor.h"
 #include "opt_xen.h"
@@ -58,8 +58,7 @@
 #endif
 
 #define NSLOTS(sz)     \
-       ((sz - DYNSEL_START) / sizeof(struct sys_segment_descriptor))
-
+       (((sz) - DYNSEL_START) / sizeof(struct sys_segment_descriptor))
 #define NDYNSLOTS      NSLOTS(MAXGDTSIZ)
 
 typedef struct {
@@ -67,7 +66,7 @@
        size_t nslots;
 } gdt_bitmap_t;
 
-size_t gdt_size;                       /* size of GDT in bytes */              
+size_t gdt_size;                       /* size of GDT in bytes */      
 static gdt_bitmap_t gdt_bitmap;                /* bitmap of busy slots */
 
 #if defined(USER_LDT) || !defined(XEN)
diff -r 8eee6827c140 -r 62ed0a0fb268 sys/arch/i386/i386/gdt.c
--- a/sys/arch/i386/i386/gdt.c  Sun Jul 02 11:16:50 2017 +0000
+++ b/sys/arch/i386/i386/gdt.c  Sun Jul 02 11:21:13 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gdt.c,v 1.63 2017/07/02 11:16:50 maxv Exp $    */
+/*     $NetBSD: gdt.c,v 1.64 2017/07/02 11:21:13 maxv Exp $    */
 
 /*
  * Copyright (c) 1996, 1997, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.63 2017/07/02 11:16:50 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.64 2017/07/02 11:21:13 maxv Exp $");
 
 #include "opt_multiprocessor.h"
 #include "opt_xen.h"
@@ -46,8 +46,7 @@
 #include <machine/gdt.h>
 
 #define NSLOTS(sz)     \
-       ((sz - DYNSEL_START) / sizeof(union descriptor))
-
+       (((sz) - DYNSEL_START) / sizeof(union descriptor))
 #define NDYNSLOTS      NSLOTS(MAXGDTSIZ)
 
 typedef struct {



Home | Main Index | Thread Index | Old Index