* Re: [PATCH 1/3] hwsim: check if radio name was already set
@ 2022-02-18 20:45 Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2022-02-18 20:45 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 651 bytes --]
On 2/18/22 13:55, James Prestwood wrote:
> This was caught by static analysis and shouldn't ever happen.
> ---
> tools/hwsim.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/hwsim.c b/tools/hwsim.c
> index 3ff3faab..8c076f51 100644
> --- a/tools/hwsim.c
> +++ b/tools/hwsim.c
> @@ -639,6 +639,9 @@ static void get_radio_callback(struct l_genl_msg *msg, void *user_data)
> break;
>
> case HWSIM_ATTR_RADIO_NAME:
> + if (name)
> + return;
> +
I changed this to break instead of return.
> name = l_strndup(data, len);
> break;
> }
>
Applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/3] hwsim: check if radio name was already set
@ 2022-02-18 19:55 James Prestwood
0 siblings, 0 replies; 2+ messages in thread
From: James Prestwood @ 2022-02-18 19:55 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 484 bytes --]
This was caught by static analysis and shouldn't ever happen.
---
tools/hwsim.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/hwsim.c b/tools/hwsim.c
index 3ff3faab..8c076f51 100644
--- a/tools/hwsim.c
+++ b/tools/hwsim.c
@@ -639,6 +639,9 @@ static void get_radio_callback(struct l_genl_msg *msg, void *user_data)
break;
case HWSIM_ATTR_RADIO_NAME:
+ if (name)
+ return;
+
name = l_strndup(data, len);
break;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-18 20:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-18 20:45 [PATCH 1/3] hwsim: check if radio name was already set Denis Kenzior
-- strict thread matches above, loose matches on Subject: below --
2022-02-18 19:55 James Prestwood
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.