Run through indent, specify cast
This commit is contained in:
parent
14dad7028b
commit
a199b17253
@ -28,6 +28,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
#include "busybox.h"
|
#include "busybox.h"
|
||||||
|
|
||||||
int mknod_main(int argc, char **argv)
|
int mknod_main(int argc, char **argv)
|
||||||
@ -35,7 +36,7 @@ int mknod_main(int argc, char **argv)
|
|||||||
char *thisarg;
|
char *thisarg;
|
||||||
mode_t mode = 0;
|
mode_t mode = 0;
|
||||||
mode_t perm = 0666;
|
mode_t perm = 0666;
|
||||||
dev_t dev = 0;
|
dev_t dev = (dev_t) 0;
|
||||||
|
|
||||||
argc--;
|
argc--;
|
||||||
argv++;
|
argv++;
|
||||||
@ -72,7 +73,7 @@ int mknod_main(int argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
mode = S_IFIFO;
|
mode = S_IFIFO;
|
||||||
if (argc!=2) {
|
if (argc != 2) {
|
||||||
show_usage();
|
show_usage();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -81,7 +82,7 @@ int mknod_main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mode == S_IFCHR || mode == S_IFBLK) {
|
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;
|
mode |= perm;
|
||||||
@ -90,4 +91,3 @@ int mknod_main(int argc, char **argv)
|
|||||||
perror_msg_and_die("%s", argv[0]);
|
perror_msg_and_die("%s", argv[0]);
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user