From caddcf8600992383b0fa2005fe816bf1dfd798a0 Mon Sep 17 00:00:00 2001 From: Ben Collins Date: Sat, 6 Mar 1999 04:15:18 +0000 Subject: [PATCH] Moved 'key.flags = 0;' inside of DB2 defines, it isn't available in DB1 --- libraries/libldbm/ldbm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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; } -- 2.39.5