mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
In the previous changeset a cast of myminor to u_int were
removed, which will cause problems on architectures where longs are longer than ints, for instance, "mknod foo c 0 0xffff00ff" would fail in such cases. Use a proper cast instead. Prompted by: bde
This commit is contained in:
parent
3805385e3d
commit
98397198e7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170692
|
@ -138,7 +138,7 @@ main(int argc, char **argv)
|
|||
range_error |= errno;
|
||||
dev = makedev(mymajor, myminor);
|
||||
if (range_error || major(dev) != (u_int) mymajor ||
|
||||
minor(dev) != myminor)
|
||||
(long)(u_int)minor(dev) != myminor)
|
||||
errx(1, "major or minor number too large");
|
||||
|
||||
uid = gid = -1;
|
||||
|
|
Loading…
Reference in a new issue