* [PATCH iproute2] ifstat: don't set errno if strdup fails
@ 2024-03-18 9:16 Denis Kirjanov
2024-03-20 4:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Denis Kirjanov @ 2024-03-18 9:16 UTC (permalink / raw)
To: stephen, dsahern; +Cc: netdev, Denis Kirjanov
the strdup man page states that the errno value
set by the function so there is not need to set it.
Signed-off-by: Denis Kirjanov <dkirjanov@suse.de>
---
misc/ifstat.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/misc/ifstat.c b/misc/ifstat.c
index 352e5622..9b93ded3 100644
--- a/misc/ifstat.c
+++ b/misc/ifstat.c
@@ -197,7 +197,6 @@ static int get_nlmsg(struct nlmsghdr *m, void *arg)
n->name = strdup(RTA_DATA(tb[IFLA_IFNAME]));
if (!n->name) {
free(n);
- errno = ENOMEM;
return -1;
}
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH iproute2] ifstat: don't set errno if strdup fails
2024-03-18 9:16 [PATCH iproute2] ifstat: don't set errno if strdup fails Denis Kirjanov
@ 2024-03-20 4:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-03-20 4:30 UTC (permalink / raw)
To: Denis Kirjanov; +Cc: stephen, dsahern, netdev, dkirjanov
Hello:
This patch was applied to iproute2/iproute2.git (main)
by Stephen Hemminger <stephen@networkplumber.org>:
On Mon, 18 Mar 2024 05:16:40 -0400 you wrote:
> the strdup man page states that the errno value
> set by the function so there is not need to set it.
>
> Signed-off-by: Denis Kirjanov <dkirjanov@suse.de>
> ---
> misc/ifstat.c | 1 -
> 1 file changed, 1 deletion(-)
Here is the summary with links:
- [iproute2] ifstat: don't set errno if strdup fails
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=4da7bfbf917b
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-20 4:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-18 9:16 [PATCH iproute2] ifstat: don't set errno if strdup fails Denis Kirjanov
2024-03-20 4:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).