Skip to content

Commit

Permalink
DAOS-16288 cart: coverity fixes for 16287,16288,16289 (#14843)
Browse files Browse the repository at this point in the history
Coverity fixes for DAOS-16287,16288,16289.

Signed-off-by: Alexander A Oganezov <alexander.a.oganezov@intel.com>
  • Loading branch information
frostedcmos authored Aug 8, 2024
1 parent 40d51a8 commit b4ceb85
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/cart/crt_group.c
Original file line number Diff line number Diff line change
Expand Up @@ -1646,7 +1646,7 @@ crt_hdlr_uri_lookup(crt_rpc_t *rpc_req)

if (rc != DER_SUCCESS)
D_INFO("uri lookup of (rank=%d:tag=%d) group=%s failed; rc=%d\n", ul_in->ul_rank,
ul_in->ul_tag, grp_priv->gp_pub.cg_grpid, rc);
ul_in->ul_tag, grp_priv == NULL ? "(null)" : grp_priv->gp_pub.cg_grpid, rc);

if (should_decref)
crt_grp_priv_decref(grp_priv);
Expand Down
4 changes: 2 additions & 2 deletions src/tests/ftest/cart/test_group_np_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ test_run(void)
/* avoid checkpatch warning */
d_rank_list_free(rank_list);
}
rank_list = uint32_array_to_rank_list(_cg_ranks,
_cg_num_ranks);
rank_list = uint32_array_to_rank_list(_cg_ranks, _cg_num_ranks);
D_ASSERTF(rank_list != NULL, "failed to convert array to rank list\n");
}

rc = crtu_wait_for_ranks(test_g.t_crt_ctx[0],
Expand Down
6 changes: 4 additions & 2 deletions src/tests/ftest/cart/test_no_timeout.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright 2018-2022 Intel Corporation.
* (C) Copyright 2018-2024 Intel Corporation.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -103,7 +103,9 @@ test_run(void)
test_g.t_srv_ctx_num, 60, 120);
D_ASSERTF(rc == 0, "wait_for_ranks() failed; rc=%d\n", rc);

crt_group_size(test_g.t_remote_group, &test_g.t_remote_group_size);
rc = crt_group_size(test_g.t_remote_group, &test_g.t_remote_group_size);
D_ASSERTF(rc == 0, "crt_group_size() failed; rc=%d\n", rc);

fprintf(stderr, "size of %s is %d\n", test_g.t_remote_group_name,
test_g.t_remote_group_size);

Expand Down

0 comments on commit b4ceb85

Please sign in to comment.