From: Howard Chu Date: Fri, 31 Mar 2006 22:05:01 +0000 (+0000) Subject: Cleanup NULL check X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~69 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=65079f768ee8a1fee91ea550d741de0c42b0bde9;p=openldap Cleanup NULL check --- diff --git a/servers/slapd/at.c b/servers/slapd/at.c index 2b7d1cd08b..9453cabf02 100644 --- a/servers/slapd/at.c +++ b/servers/slapd/at.c @@ -457,6 +457,11 @@ at_add( char *cname = NULL; char *oidm = NULL; + if ( !at->at_oid ) { + *err = ""; + return SLAP_SCHERR_ATTR_INCOMPLETE; + } + if ( !OID_LEADCHAR( at->at_oid[0] )) { char *oid; @@ -501,13 +506,9 @@ at_add( cname = at->at_names[0]; - } else if ( at->at_oid ) { + } else { cname = at->at_oid; - } else { - *err = ""; - code = SLAP_SCHERR_ATTR_INCOMPLETE; - goto error_return; } *err = cname;