consistent error check

This commit is contained in:
Connor Lane Smith
2011-06-04 12:20:41 +01:00
parent de221bc6f5
commit d90ced2047
13 changed files with 22 additions and 22 deletions

View File

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