Skip to content

Commit

Permalink
DAOS-16078 common: fix a Coverity issue (release/2.6 catching up with…
Browse files Browse the repository at this point in the history
… the master) (#14755)

This also reverts commits 3af8340 and c394274.

Signed-off-by: Jan Michalski <[email protected]>
  • Loading branch information
janekmi authored Aug 6, 2024
1 parent 7191990 commit 47b7976
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/common/btree.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,6 @@ hkey_int_gen(d_iov_t *key, void *hkey)
* this is a little nicer to read.
*/
*(uint64_t *)hkey = 0;
D_ASSERT(key->iov_buf != NULL);
memcpy(hkey, key->iov_buf, key->iov_len);
}

Expand Down Expand Up @@ -987,7 +986,7 @@ btr_embedded_create_hash(struct btr_context *tcx, bool force)
D_ERROR("Failed to get key from embedded record: " DF_RC "\n", DP_RC(rc));
return rc;
}
D_ASSERT(rec != NULL);
D_ASSERT(old_key.iov_buf != NULL);
btr_hkey_gen(tcx, &old_key, &rec->rec_hkey[0]);
btr_embedded_hash_set(tcx);
}
Expand Down

0 comments on commit 47b7976

Please sign in to comment.