diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2019-02-09 04:54:12 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2019-02-09 04:54:12 +0000 |
commit | af3ddbc131a6e9e2acf02583b0d0aaba64e65cc6 (patch) | |
tree | 19ae11eafb4f20a350cc4bd32d17007d58cd7375 /sys | |
parent | 9a4a7e85aba738c6fac82ce1ebe6607c1b32c13b (diff) |
major() and minor() are documented as returning unsigned, so do so
ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/types.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/sys/types.h b/sys/sys/types.h index 647359c175f..dbbde5872e7 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: types.h,v 1.47 2017/02/04 02:54:33 guenther Exp $ */ +/* $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ */ /* $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ */ /*- @@ -209,8 +209,8 @@ __END_DECLS #if __BSD_VISIBLE /* Major, minor numbers, dev_t's. */ -#define major(x) ((int32_t)(((u_int32_t)(x) >> 8) & 0xff)) -#define minor(x) ((int32_t)((x) & 0xff) | (((x) & 0xffff0000) >> 8)) +#define major(x) (((unsigned)(x) >> 8) & 0xff) +#define minor(x) ((unsigned)((x) & 0xff) | (((x) & 0xffff0000) >> 8)) #define makedev(x,y) ((dev_t)((((x) & 0xff) << 8) | ((y) & 0xff) | (((y) & 0xffff00) << 8))) #endif |