For makedev(), cast the minor argument to unsigned type explicitely,
avoiding possible sign propagation. Submitted by: hselasky
This commit is contained in:
parent
2b79a966ab
commit
dfcc612cb0
@ -366,7 +366,7 @@ __bitcount64(__uint64_t _x)
|
||||
|
||||
#define major(x) ((int)((dev_t)(x) >> 32)) /* major number */
|
||||
#define minor(x) ((int)((x) & 0xffffffff)) /* minor number */
|
||||
#define makedev(x, y) (((dev_t)(x) << 32) | (y)) /* create dev_t */
|
||||
#define makedev(x, y) (((dev_t)(x) << 32) | (unsigned)(y)) /* create dev_t */
|
||||
|
||||
/*
|
||||
* These declarations belong elsewhere, but are repeated here and in
|
||||
|
Loading…
Reference in New Issue
Block a user