tree-wide: remove a number of invocations of strerror() and replace by %m
Let's clean up our tree a bit, and reduce invocations of the thread-unsafe strerror() by replacing it with printf()'s %m specifier.
This commit is contained in:
+3
-5
@@ -5344,15 +5344,13 @@ int update_reboot_param_file(const char *param) {
|
||||
int r = 0;
|
||||
|
||||
if (param) {
|
||||
|
||||
r = write_string_file(REBOOT_PARAM_FILE, param, WRITE_STRING_FILE_CREATE);
|
||||
if (r < 0)
|
||||
log_error("Failed to write reboot param to "
|
||||
REBOOT_PARAM_FILE": %s", strerror(-r));
|
||||
return log_error_errno(r, "Failed to write reboot param to "REBOOT_PARAM_FILE": %m");
|
||||
} else
|
||||
unlink(REBOOT_PARAM_FILE);
|
||||
(void) unlink(REBOOT_PARAM_FILE);
|
||||
|
||||
return r;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int umount_recursive(const char *prefix, int flags) {
|
||||
|
||||
Reference in New Issue
Block a user