summaryrefslogtreecommitdiffhomepage
path: root/coreutils
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2002-08-23 03:37:07 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2002-08-23 03:37:07 +0000
commita199b1725344f211c79b880855e6895bdd6c7477 (patch)
tree1a9bd628d84ce6296297d667672fd52b15e90c98 /coreutils
parent14dad7028bcc90c02e92fa24fce9e5a39116fb24 (diff)
Run through indent, specify cast
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/mknod.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/coreutils/mknod.c b/coreutils/mknod.c
index 10d026ce3..432ec2b25 100644
--- a/coreutils/mknod.c
+++ b/coreutils/mknod.c
@@ -28,6 +28,7 @@
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
+#include <sys/stat.h>
#include "busybox.h"
int mknod_main(int argc, char **argv)
@@ -35,7 +36,7 @@ int mknod_main(int argc, char **argv)
char *thisarg;
mode_t mode = 0;
mode_t perm = 0666;
- dev_t dev = 0;
+ dev_t dev = (dev_t) 0;
argc--;
argv++;
@@ -72,7 +73,7 @@ int mknod_main(int argc, char **argv)
break;
case 'p':
mode = S_IFIFO;
- if (argc!=2) {
+ if (argc != 2) {
show_usage();
}
break;
@@ -81,7 +82,7 @@ int mknod_main(int argc, char **argv)
}
if (mode == S_IFCHR || mode == S_IFBLK) {
- dev = (atoi(argv[2]) << 8) | atoi(argv[3]);
+ dev = (dev_t) ((atoi(argv[2]) << 8) | atoi(argv[3]));
}
mode |= perm;
@@ -90,4 +91,3 @@ int mknod_main(int argc, char **argv)
perror_msg_and_die("%s", argv[0]);
return EXIT_SUCCESS;
}
-