diff options
-rw-r--r-- | src/ipcpd/unicast/dir/dht.c | 3 | ||||
-rw-r--r-- | src/lib/tpm.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/ipcpd/unicast/dir/dht.c b/src/ipcpd/unicast/dir/dht.c index 656b8b94..858fad0b 100644 --- a/src/ipcpd/unicast/dir/dht.c +++ b/src/ipcpd/unicast/dir/dht.c @@ -1450,6 +1450,7 @@ static ssize_t dht_kv_wait_req(const uint8_t * key, return i; no_vals: pthread_mutex_unlock(&dht.reqs.mtx); + *vals = NULL; return 0; fail_val_data: freebufs(*vals, i); @@ -3285,6 +3286,8 @@ uint64_t dht_query(const uint8_t * key) } if (n == 0) { + assert(vals == NULL); + log_dbg(KEY_FMT " No local values.", KEY_VAL(key)); n = dht_kv_query_remote(key, &vals, NULL); if (n < 0) { diff --git a/src/lib/tpm.c b/src/lib/tpm.c index 52c28de7..7a17ef6b 100644 --- a/src/lib/tpm.c +++ b/src/lib/tpm.c @@ -95,6 +95,9 @@ static void tpm_debug_thread(struct pthr_el * e) diff = ts_diff_ms(&now, &e->start) / 1000; intv = ts_diff_ms(&now, &e->last) / 1000; + (void) diff; /* Never read if both build options off (0) */ + (void) intv; /* Never read if report option off (0) */ + if (BETWEEN(TPM_DEBUG_REPORT_INTERVAL, 0, intv)) { log_dbg("Thread %d:%lx running for %ld s.\n", getpid(),e->thr, diff); |