mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-18 05:10:32 +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 commitc42f6f0997) (cherry picked from commit93359f2b32)
This commit is contained in:
parent
db4975733b
commit
a120e68518
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