diff options
author | mtm <mtm@FreeBSD.org> | 2003-06-02 05:52:24 +0000 |
---|---|---|
committer | mtm <mtm@FreeBSD.org> | 2003-06-02 05:52:24 +0000 |
commit | dcdb28fa3b7385831f0db2e9760afa88924ab4d6 (patch) | |
tree | 6633d2ceee96bce6536d86ae33fc619ef3a5b317 /usr.sbin/chroot | |
parent | 855f61b550e96c1a378280bf549c72f367540611 (diff) | |
download | FreeBSD-src-dcdb28fa3b7385831f0db2e9760afa88924ab4d6.zip FreeBSD-src-dcdb28fa3b7385831f0db2e9760afa88924ab4d6.tar.gz |
Explicitly compare the values returned by chdir(2) and chroot(2) to -1.
Diffstat (limited to 'usr.sbin/chroot')
-rw-r--r-- | usr.sbin/chroot/chroot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/chroot/chroot.c b/usr.sbin/chroot/chroot.c index 721ef51..3aeff1e 100644 --- a/usr.sbin/chroot/chroot.c +++ b/usr.sbin/chroot/chroot.c @@ -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]) { |