mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 09:50:09 +01:00
core: use nm_strerror_native() instead of strerror()
strerror() is not thread-safe. We avoid non-thread-safe API and have instead our own wrapper nm_strerror_native(). Use it.
This commit is contained in:
parent
7882920928
commit
04edba879d
2 changed files with 3 additions and 3 deletions
|
|
@ -810,7 +810,7 @@ sett_conn_changed(NMSettingsConnection *sett_conn,
|
|||
nm_log_dbg(LOGD_WIFI,
|
||||
"iwd: profile at %s not removed: %s (%i)",
|
||||
orig_full_path,
|
||||
strerror(errno),
|
||||
nm_strerror_native(errno),
|
||||
errno);
|
||||
|
||||
removed = TRUE;
|
||||
|
|
@ -1431,7 +1431,7 @@ try_delete_file:
|
|||
if (g_remove(full_path) == 0)
|
||||
_LOGD("IWD profile at %s removed", full_path);
|
||||
else if (errno != ENOENT)
|
||||
_LOGD("IWD profile at %s not removed: %s (%i)", full_path, strerror(errno), errno);
|
||||
_LOGD("IWD profile at %s not removed: %s (%i)", full_path, nm_strerror_native(errno), errno);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ stop(NMDhcpClient *client, gboolean release)
|
|||
*/
|
||||
if (kill(pid, sig) == -1) {
|
||||
errsv = errno;
|
||||
_LOGE("failed to kill dhcpcd %d:%s", errsv, strerror(errsv));
|
||||
_LOGE("failed to kill dhcpcd %d:%s", errsv, nm_strerror_native(errsv));
|
||||
}
|
||||
|
||||
/* When this function exits NM expects the PID to be -1.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue