Skip to content

Commit

Permalink
man: Fix uninitialized err_entry
Browse files Browse the repository at this point in the history
fi_cq_readerr is no longer called on uninitialized
err_data and err_data_size in fi_setup.7.md.

Signed-off-by: Rémi Dehenne <remi.dehenne@cea.fr>
  • Loading branch information
rd-cea authored and j-xiong committed Mar 20, 2024
1 parent d9517e5 commit 358422a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions man/fi_setup.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -947,8 +947,12 @@ struct fi_cq_err_entry {
/* Sample error handling */
struct fi_cq_msg_entry entry;
struct fi_cq_err_entry err_entry;
char err_data[256];
int ret;
err_entry.err_data = err_data;
err_entry.err_data_size = 256;
ret = fi_cq_read(cq, &entry, 1);
if (ret == -FI_EAVAIL)
ret = fi_cq_readerr(cq, &err_entry, 0);
Expand Down

0 comments on commit 358422a

Please sign in to comment.