mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
Merge pull request #30340 from yuwata/repart-error-handling-ftruncate
repart: fix coding style of error handling
This commit is contained in:
@@ -6264,10 +6264,10 @@ static int context_minimize(Context *context) {
|
||||
d = loop_device_unref(d);
|
||||
|
||||
/* Erase the previous filesystem first. */
|
||||
if (ftruncate(fd, 0))
|
||||
if (ftruncate(fd, 0) < 0)
|
||||
return log_error_errno(errno, "Failed to erase temporary file: %m");
|
||||
|
||||
if (ftruncate(fd, fsz))
|
||||
if (ftruncate(fd, fsz) < 0)
|
||||
return log_error_errno(errno, "Failed to truncate temporary file to %s: %m", FORMAT_BYTES(fsz));
|
||||
|
||||
if (arg_offline <= 0) {
|
||||
|
||||
Reference in New Issue
Block a user