diff options
author | Denis Kirjanov <kirjanov@gmail.com> | 2024-03-18 05:16:40 -0400 |
---|---|---|
committer | Stephen Hemminger <stephen@networkplumber.org> | 2024-03-19 21:17:55 -0700 |
commit | 4da7bfbf917bacfe19974634de0006be24f0b89f (patch) | |
tree | adea32f3cd9572acb68abcdb47bd289337697787 /misc/ifstat.c | |
parent | b22a3430bd17c4f75e6f113ecfeb8ea386d6b408 (diff) |
ifstat: don't set errno if strdup fails
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>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Diffstat (limited to 'misc/ifstat.c')
-rw-r--r-- | misc/ifstat.c | 1 |
1 files changed, 0 insertions, 1 deletions
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; } |