Module Name:    src
Committed By:   christos
Date:           Sat Jul 30 16:37:05 UTC 2011

Modified Files:
        src/sys/sys: ptree.h

Log Message:
since all the fields are unsigned, make the constants unsigned too.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/sys/ptree.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/ptree.h
diff -u src/sys/sys/ptree.h:1.3 src/sys/sys/ptree.h:1.4
--- src/sys/sys/ptree.h:1.3	Tue Nov 25 10:13:47 2008
+++ src/sys/sys/ptree.h	Sat Jul 30 12:37:05 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ptree.h,v 1.3 2008/11/25 15:13:47 ad Exp $ */
+/* $NetBSD: ptree.h,v 1.4 2011/07/30 16:37:05 christos Exp $ */
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -46,42 +46,42 @@
 
 typedef struct pt_node {
 	uintptr_t ptn_slots[2];		/* must be first */
-#define	PT_SLOT_LEFT			0
-#define	PT_SLOT_RIGHT			1
+#define	PT_SLOT_LEFT			0u
+#define	PT_SLOT_RIGHT			1u
 #ifdef _PT_PRIVATE
-#define	PT_SLOT_ROOT			0
-#define	PT_SLOT_OTHER			1
-#define	PT_SLOT_ODDMAN			1
-#define	PT_TYPE_LEAF			0x00000000
-#define	PT_TYPE_BRANCH			0x00000001
-#define	PT_TYPE_MASK			0x00000001
+#define	PT_SLOT_ROOT			0u
+#define	PT_SLOT_OTHER			1u
+#define	PT_SLOT_ODDMAN			1u
+#define	PT_TYPE_LEAF			0x00000000u
+#define	PT_TYPE_BRANCH			0x00000001u
+#define	PT_TYPE_MASK			0x00000001u
 #endif /* _PT_PRIVATE */
 
 	uint32_t ptn_nodedata;
 #ifdef _PT_PRIVATE
-#define	PTN_LEAF_POSITION_BITS		8
-#define	PTN_LEAF_POSITION_SHIFT		0
-#define	PTN_BRANCH_POSITION_BITS	8
-#define	PTN_BRANCH_POSITION_SHIFT	8
+#define	PTN_LEAF_POSITION_BITS		8u
+#define	PTN_LEAF_POSITION_SHIFT		0u
+#define	PTN_BRANCH_POSITION_BITS	8u
+#define	PTN_BRANCH_POSITION_SHIFT	8u
 #ifndef PTNOMASK
-#define	PTN_MASK_BITLEN_BITS		15
-#define	PTN_MASK_BITLEN_SHIFT		16
-#define	PTN_MASK_FLAG			0x80000000
+#define	PTN_MASK_BITLEN_BITS		15u
+#define	PTN_MASK_BITLEN_SHIFT		16u
+#define	PTN_MASK_FLAG			0x80000000u
 #endif
 #endif /* _PT_PRIVATE */
 
 	uint32_t ptn_branchdata;
 #ifdef _PT_PRIVATE
-#define	PTN_BRANCH_BITOFF_BITS		15
-#define	PTN_BRANCH_BITOFF_SHIFT		0
-#define	PTN_BRANCH_BITLEN_BITS		8
-#define	PTN_BRANCH_BITLEN_SHIFT		16
+#define	PTN_BRANCH_BITOFF_BITS		15u
+#define	PTN_BRANCH_BITOFF_SHIFT		0u
+#define	PTN_BRANCH_BITLEN_BITS		8u
+#define	PTN_BRANCH_BITLEN_SHIFT		16u
 #if 0
-#define	PTN_ORIENTATION_BITS		1
-#define	PTN_ORIENTATION_SHIFT		30
+#define	PTN_ORIENTATION_BITS		1u
+#define	PTN_ORIENTATION_SHIFT		30u
 #endif
-#define	PTN_BRANCH_UNUSED		0x3f000000
-#define	PTN_XBRANCH_FLAG		0x80000000
+#define	PTN_BRANCH_UNUSED		0x3f000000u
+#define	PTN_XBRANCH_FLAG		0x80000000u
 #endif /* _PT_PRIVATE */
 } pt_node_t;
 

Reply via email to