From fb685d1da5d460b0187cea9e49f07e6057c3c180 Mon Sep 17 00:00:00 2001 From: Chaitanya Tata Date: Wed, 8 Nov 2023 19:58:11 +0530 Subject: [PATCH] [nrf noup] zephyr: Print only non-null buffers fixup! [nrf noup] zephyr: Add support for WPA CLI zephyr Print only non-empty responses. Signed-off-by: Chaitanya Tata --- wpa_supplicant/wpa_cli_zephyr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/wpa_cli_zephyr.c b/wpa_supplicant/wpa_cli_zephyr.c index f0479c83f..ba7063121 100644 --- a/wpa_supplicant/wpa_cli_zephyr.c +++ b/wpa_supplicant/wpa_cli_zephyr.c @@ -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; }