From: Ben Collins Date: Sat, 6 Mar 1999 04:15:18 +0000 (+0000) Subject: Moved 'key.flags = 0;' inside of DB2 defines, it isn't available in DB1 X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~467 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=caddcf8600992383b0fa2005fe816bf1dfd798a0;p=openldap Moved 'key.flags = 0;' inside of DB2 defines, it isn't available in DB1 --- diff --git a/libraries/libldbm/ldbm.c b/libraries/libldbm/ldbm.c index d57e279ff1..46e88c66fc 100644 --- a/libraries/libldbm/ldbm.c +++ b/libraries/libldbm/ldbm.c @@ -335,6 +335,8 @@ ldbm_firstkey( LDBM ldbm ) if ( (*dbci->c_get)( dbci, &key, &data, DB_NEXT ) == 0 ) { ldbm_datum_free( ldbm, data ); } + else { + key.flags = 0; #else int rc; @@ -343,9 +345,8 @@ ldbm_firstkey( LDBM ldbm ) if ( (rc = (*ldbm->seq)( ldbm, &key, &data, R_FIRST )) == 0 ) { key = ldbm_datum_dup( ldbm, key ); } -#endif else { - key.flags = 0; +#endif key.dptr = NULL; key.dsize = 0; } @@ -379,6 +380,8 @@ ldbm_nextkey( LDBM ldbm, Datum key ) if ( (*dbcp->c_get)( dbcp, &key, &data, DB_NEXT ) == 0 ) { ldbm_datum_free( ldbm, data ); } + else { + key.flags = 0; #else int rc; @@ -387,9 +390,8 @@ ldbm_nextkey( LDBM ldbm, Datum key ) if ( (rc = (*ldbm->seq)( ldbm, &key, &data, R_NEXT )) == 0 ) { key = ldbm_datum_dup( ldbm, key ); } -#endif else { - key.flags = 0; +#endif key.dptr = NULL; key.dsize = 0; }