]> git.sur5r.net Git - openldap/commitdiff
vc.c: ber_printf/flatten rc==LBER_ERROR -> rc<0
authorHallvard Furuseth <hallvard@openldap.org>
Wed, 12 Jan 2011 14:23:07 +0000 (14:23 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Wed, 12 Jan 2011 14:23:07 +0000 (14:23 +0000)
libraries/libldap/vc.c

index ef5d09402c12727f4f34653c0f76ce1ab5738f98..47b0b8d7584a5e16882459dc081bea8086efed2f 100644 (file)
@@ -235,7 +235,7 @@ ldap_verify_credentials(LDAP *ld,
                }
        }
 
-       if (rc == LBER_ERROR) {
+       if (rc < 0) {
                rc = ld->ld_errno = LDAP_ENCODING_ERROR;
                goto done;
        }
@@ -259,14 +259,14 @@ ldap_verify_credentials(LDAP *ld,
                rc = ber_printf(ber, /*"{"*/ "N}");
        }
 
-       if (rc == LBER_ERROR) {
+       if (rc < 0) {
                rc = ld->ld_errno = LDAP_ENCODING_ERROR;
                goto done;
        }
 
 
        rc = ber_flatten2(ber, &reqdata, 0);
-       if (rc == LBER_ERROR) {
+       if (rc < 0) {
                rc = ld->ld_errno = LDAP_ENCODING_ERROR;
                goto done;
        }