repart: fix coding style of error handling

Follow-up for c4a87b76c3.
This commit is contained in:
Yu Watanabe
2023-12-06 11:34:11 +09:00
parent 1ea27bd79e
commit 6c7f4badea

View File

@@ -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) {