summaryrefslogtreecommitdiffstats
path: root/sbin/nfsiod
diff options
context:
space:
mode:
authormux <mux@FreeBSD.org>2002-08-11 11:32:02 +0000
committermux <mux@FreeBSD.org>2002-08-11 11:32:02 +0000
commit544b3fb6045b998a316e58f4dc0ad30a05280df1 (patch)
tree75bb248fe568b2ff3b03d52ae15ae2a82c7185d8 /sbin/nfsiod
parent9f330c956febc5822317d5d625b86e4c575dd263 (diff)
downloadFreeBSD-src-544b3fb6045b998a316e58f4dc0ad30a05280df1.zip
FreeBSD-src-544b3fb6045b998a316e58f4dc0ad30a05280df1.tar.gz
The kldload() system call doesn't return 0 when it succeeded,
so compare the return value against -1 to see if it failed instead of simply doing if (kldload("nfs")).
Diffstat (limited to 'sbin/nfsiod')
-rw-r--r--sbin/nfsiod/nfsiod.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/nfsiod/nfsiod.c b/sbin/nfsiod/nfsiod.c
index 15e5f76..eb2bca7 100644
--- a/sbin/nfsiod/nfsiod.c
+++ b/sbin/nfsiod/nfsiod.c
@@ -81,7 +81,7 @@ main(int argc, char *argv[])
error = getvfsbyname("nfs", &vfc);
if (error) {
- if (kldload("nfs"))
+ if (kldload("nfs") == -1)
err(1, "kldload(nfs)");
error = getvfsbyname("nfs", &vfc);
}
OpenPOWER on IntegriCloud