consistent error check
This commit is contained in:
2
mkfifo.c
2
mkfifo.c
@@ -11,7 +11,7 @@ main(int argc, char *argv[])
|
||||
while(getopt(argc, argv, "") != -1)
|
||||
exit(EXIT_FAILURE);
|
||||
for(; optind < argc; optind++)
|
||||
if(mkfifo(argv[optind], S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) != 0)
|
||||
if(mkfifo(argv[optind], S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) == -1)
|
||||
eprintf("mkfifo %s:", argv[optind]);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user