summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/test/kvs_stec/kvs_stec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/test/kvs_stec/kvs_stec.c b/ext/test/kvs_stec/kvs_stec.c
index 35af93415c5..89fc0766d09 100644
--- a/ext/test/kvs_stec/kvs_stec.c
+++ b/ext/test/kvs_stec/kvs_stec.c
@@ -326,14 +326,14 @@ kvs_call(WT_CURSOR *wt_cursor, const char *fname,
session = cursor->session;
ret = 0;
- /* Set up the return buffer. */
- cursor->record.val = cursor->val;
-
/*
* Call the underlying function; we have to loop because the value
* buffer may need to be grown to accommodate the returned value.
*/
for (;;) {
+ /* Set up the return buffer. */
+ cursor->record.val = cursor->val;
+
if ((ret = f(cursor->data_source->kvs, &cursor->record,
(unsigned long)0, (unsigned long)cursor->val_len)) != 0) {
if (ret == KVS_E_KEY_NOT_FOUND)