From: Ted Lemon Date: Wed, 6 Oct 1999 19:17:44 +0000 (+0000) Subject: Simplify the conditionals in the previous code. X-Git-Tag: BCTEL_SPECIAL_19991124~142 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b74d3c6e68658953a3c7092f04ea5fd032788138;p=thirdparty%2Fdhcp.git Simplify the conditionals in the previous code. --- diff --git a/server/omapi.c b/server/omapi.c index 7e632573a..980804101 100644 --- a/server/omapi.c +++ b/server/omapi.c @@ -29,7 +29,7 @@ #ifndef lint static char copyright[] = -"$Id: omapi.c,v 1.12 1999/10/06 19:07:58 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: omapi.c,v 1.13 1999/10/06 19:17:44 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -1062,17 +1062,15 @@ isc_result_t dhcp_host_set_value (omapi_object_t *h, } if (!omapi_ds_strcmp (name, "statements")) { - if (host -> group && host -> group -> statements && - (!host -> named_group || - host -> group != host -> named_group -> group) && - host -> group != &root_group) - return ISC_R_EXISTS; if (!host -> group) host -> group = clone_group (&root_group, "dhcp_host_set_value"); - if (host -> group == &root_group || - (host -> named_group && - host -> named_group -> group == host -> group)) { + else { + if (host -> group -> statements && + (!host -> named_group || + host -> group != host -> named_group -> group) && + host -> group != &root_group) + return ISC_R_EXISTS; host -> group = clone_group (host -> group, "dhcp_host_set_value"); }