]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/at.c
cleanup
[openldap] / servers / slapd / at.c
index b9239013fd5872c59c1115e70b118b1e64514a7b..9453cabf02383cb3fb9acc1738a5ec89c69972b8 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2005 The OpenLDAP Foundation.
+ * Copyright 1998-2006 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -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;