]> granicus.if.org Git - python/commitdiff
Whoops, need to pay attention to those test failures.
authorNeal Norwitz <nnorwitz@gmail.com>
Sat, 19 May 2007 04:34:55 +0000 (04:34 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sat, 19 May 2007 04:34:55 +0000 (04:34 +0000)
Move the clear to *before* the first use, not after.

Modules/_bsddb.c

index cc99926214eb9adf66190f626bdd1ed66baff2a7..34604ed09f908b7a2f83186de3c6e2dd77cc9794 100644 (file)
@@ -1724,6 +1724,7 @@ DB_get_both(DBObject* self, PyObject* args, PyObject* kwargs)
     CHECK_DB_NOT_CLOSED(self);
     if (!make_key_dbt(self, keyobj, &key, NULL))
         return NULL;
+    CLEAR_DBT(data);
     if ( !make_dbt(dataobj, &data) ||
          !checkTxnObj(txnobj, &txn) )
     {
@@ -1731,7 +1732,6 @@ DB_get_both(DBObject* self, PyObject* args, PyObject* kwargs)
         return NULL;
     }
 
-    CLEAR_DBT(data);
     flags |= DB_GET_BOTH;
 
     if (CHECK_DBFLAG(self, DB_THREAD)) {