diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2006-10-21 14:02:12 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2006-10-21 14:02:12 +0000 |
commit | 143a083cb6d8f0033248cf779ef1d49c4fdcdaae (patch) | |
tree | 18dd1c6f6666f282399953515add0d4d89900b94 | |
parent | 3d1784e2aac15935f7094818fd3200805e1d80bb (diff) |
the create and destroy functions for clonable interfaces return 0 on
success, not -1 on error. fix check in 2 cases. ok mpf mcbride
-rw-r--r-- | sys/net/if.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index b2dc894310d..bf856c8db61 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.149 2006/08/29 17:19:43 henning Exp $ */ +/* $OpenBSD: if.c,v 1.150 2006/10/21 14:02:11 henning Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -660,7 +660,7 @@ if_clone_create(const char *name) if (ifunit(name) != NULL) return (EEXIST); - if ((ret = (*ifc->ifc_create)(ifc, unit)) != -1 && + if ((ret = (*ifc->ifc_create)(ifc, unit)) == 0 && (ifp = ifunit(name)) != NULL) if_addgroup(ifp, ifc->ifc_name); @@ -696,7 +696,7 @@ if_clone_destroy(const char *name) if_delgroup(ifp, ifc->ifc_name); - if ((ret = (*ifc->ifc_destroy)(ifp)) == -1) + if ((ret = (*ifc->ifc_destroy)(ifp)) != 0) if_addgroup(ifp, ifc->ifc_name); return (ret); |