mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Cleanup NULL check
This commit is contained in:
parent
8c990ff2e9
commit
65079f768e
@ -457,6 +457,11 @@ at_add(
|
|||||||
char *cname = NULL;
|
char *cname = NULL;
|
||||||
char *oidm = NULL;
|
char *oidm = NULL;
|
||||||
|
|
||||||
|
if ( !at->at_oid ) {
|
||||||
|
*err = "";
|
||||||
|
return SLAP_SCHERR_ATTR_INCOMPLETE;
|
||||||
|
}
|
||||||
|
|
||||||
if ( !OID_LEADCHAR( at->at_oid[0] )) {
|
if ( !OID_LEADCHAR( at->at_oid[0] )) {
|
||||||
char *oid;
|
char *oid;
|
||||||
|
|
||||||
@ -501,13 +506,9 @@ at_add(
|
|||||||
|
|
||||||
cname = at->at_names[0];
|
cname = at->at_names[0];
|
||||||
|
|
||||||
} else if ( at->at_oid ) {
|
} else {
|
||||||
cname = at->at_oid;
|
cname = at->at_oid;
|
||||||
|
|
||||||
} else {
|
|
||||||
*err = "";
|
|
||||||
code = SLAP_SCHERR_ATTR_INCOMPLETE;
|
|
||||||
goto error_return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*err = cname;
|
*err = cname;
|
||||||
|
Loading…
Reference in New Issue
Block a user