Skip to content

Commit

Permalink
warning clean-up: replaced assert with GOTO_ERROR
Browse files Browse the repository at this point in the history
  • Loading branch information
brtnfld committed Sep 20, 2023
1 parent 6996e7d commit ff7da74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/H5FDsubfiling/H5subfiling_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,8 @@ init_app_layout(sf_topology_t *app_topology, MPI_Comm comm, MPI_Comm node_comm)
if (app_layout->layout[i].node_local_rank == 0)
app_layout->node_count++;

assert(app_layout->node_count > 0);
if (app_layout->node_count <= 0)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "node count less than or equal to zero");

if (NULL ==
(app_layout->node_ranks = malloc((size_t)app_layout->node_count * sizeof(*app_layout->node_ranks))))
Expand Down

0 comments on commit ff7da74

Please sign in to comment.