summaryrefslogtreecommitdiffstats
path: root/usr.sbin/chroot
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2003-06-02 05:52:24 +0000
committermtm <mtm@FreeBSD.org>2003-06-02 05:52:24 +0000
commitdcdb28fa3b7385831f0db2e9760afa88924ab4d6 (patch)
tree6633d2ceee96bce6536d86ae33fc619ef3a5b317 /usr.sbin/chroot
parent855f61b550e96c1a378280bf549c72f367540611 (diff)
downloadFreeBSD-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.c2
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]) {
OpenPOWER on IntegriCloud