Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
[nrf noup] zephyr: Print only non-null buffers
Browse files Browse the repository at this point in the history
fixup! [nrf noup] zephyr: Add support for WPA CLI zephyr

Print only non-empty responses.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
  • Loading branch information
krish2718 committed Nov 8, 2023
1 parent d7b8657 commit fb685d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wpa_supplicant/wpa_cli_zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ static int _wpa_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd, int print,

if (print) {
buf[len] = '\0';
printf("%s", buf);
if (buf)
printf("%s", buf);
}
return 0;
}
Expand Down

0 comments on commit fb685d1

Please sign in to comment.