Explicitly compare the values returned by chdir(2) and chroot(2) to -1.
This commit is contained in:
parent
1104779b70
commit
fe6983de4b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=115677
@ -76,7 +76,7 @@ main(argc, argv)
|
||||
if (argc < 1)
|
||||
usage();
|
||||
|
||||
if (chdir(argv[0]) || chroot("."))
|
||||
if (chdir(argv[0]) == -1 || chroot(".") == -1)
|
||||
err(1, "%s", argv[0]);
|
||||
|
||||
if (argv[1]) {
|
||||
|
Loading…
Reference in New Issue
Block a user