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:
Xin LI 2007-06-14 03:16:16 +00:00
parent 3805385e3d
commit 98397198e7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170692

View File

@ -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;