mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-17 14:00:22 +01:00
daemon-helper: use _nm_strerror_r() to avoid non-thread-safe strerror()
Yes, there probably are not multiple threads here. It's a matter of principle to
not use smelly functions.
Also, copy the "errno" value we want to print, before calling various functions.
(cherry picked from commit c42f6f0997)
This commit is contained in:
parent
524febf271
commit
93359f2b32
1 changed files with 2 additions and 2 deletions
|
|
@ -120,8 +120,8 @@ cmd_resolve_address(void)
|
|||
service,
|
||||
ret,
|
||||
gai_strerror(ret),
|
||||
errno,
|
||||
strerror(errno));
|
||||
errsv,
|
||||
_nm_strerror_r(errsv, buf, sizeof(buf)));
|
||||
} else {
|
||||
fprintf(stderr,
|
||||
"getnameinfo() via service '%s' failed: %d (%s)\n",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue