summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2003-12-24 23:48:07 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2003-12-24 23:48:07 +0000
commitc78b6c41240257191ae3be8dc1e2d29109a7e76b (patch)
treeb1e613365dbfe1a41c8c7d84d360452a22c4cf32 /usr.sbin/bgpd/rde.c
parent47c312b4f6967df86d6174660cda5b5e313083db (diff)
syscalls return -1 on err so test for == -1 instead of the < 0 found in very
few places, requested by theo
Diffstat (limited to 'usr.sbin/bgpd/rde.c')
-rw-r--r--usr.sbin/bgpd/rde.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c
index fb4792d4c70..c73b2fdc027 100644
--- a/usr.sbin/bgpd/rde.c
+++ b/usr.sbin/bgpd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.27 2003/12/24 20:09:57 henning Exp $ */
+/* $OpenBSD: rde.c,v 1.28 2003/12/24 23:48:06 henning Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -91,7 +91,7 @@ rde_main(struct bgpd_config *config, int pipe_m2r[2], int pipe_s2r[2])
if ((pw = getpwnam(BGPD_USER)) == NULL)
fatal("getpwnam", errno);
- if (chroot(pw->pw_dir) < 0)
+ if (chroot(pw->pw_dir) == -1)
fatal("chroot failed", errno);
chdir("/");