Source-Changes-HG archive

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

[src/trunk]: src/sys/sys rbtree: Use __BIT macro to avoid a lot of compiler w...



details:   https://anonhg.NetBSD.org/src/rev/326843c2ef5f
branches:  trunk
changeset: 839801:326843c2ef5f
user:      roy <roy%NetBSD.org@localhost>
date:      Thu Mar 07 12:07:42 2019 +0000

description:
rbtree: Use __BIT macro to avoid a lot of compiler warnings

diffstat:

 sys/sys/rbtree.h |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r 5381e2820c42 -r 326843c2ef5f sys/sys/rbtree.h
--- a/sys/sys/rbtree.h  Thu Mar 07 12:05:54 2019 +0000
+++ b/sys/sys/rbtree.h  Thu Mar 07 12:07:42 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rbtree.h,v 1.3 2019/03/07 12:05:54 roy Exp $   */
+/*     $NetBSD: rbtree.h,v 1.4 2019/03/07 12:07:42 roy Exp $   */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -57,8 +57,8 @@
         * rb_node will have an alignment of 4 or 8 bytes.
         */
        uintptr_t rb_info;
-#define        RB_FLAG_POSITION        0x2
-#define        RB_FLAG_RED             0x1
+#define        RB_FLAG_POSITION        __BIT(1)
+#define        RB_FLAG_RED             __BIT(0)
 #define        RB_FLAG_MASK            (RB_FLAG_POSITION|RB_FLAG_RED)
 #define        RB_FATHER(rb) \
     ((struct rb_node *)((rb)->rb_info & ~RB_FLAG_MASK))



Home | Main Index | Thread Index | Old Index