diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2020-10-09 14:59:44 +0200 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2020-10-09 15:02:23 +0200 |
commit | d7a0f1f4f9910a1a2d290e31b2ba8cfa7126fbdd (patch) | |
tree | f519b20cb0835f71bd553abeca761882cad3299b /src/cryptsetup | |
parent | 44e66de0f25e65d5bd8b2f7f848e0fc7b98199ed (diff) | |
download | systemd-d7a0f1f4f9910a1a2d290e31b2ba8cfa7126fbdd.tar.gz |
tree-wide: assorted coccinelle fixes
Diffstat (limited to 'src/cryptsetup')
-rw-r--r-- | src/cryptsetup/cryptsetup-generator.c | 3 | ||||
-rw-r--r-- | src/cryptsetup/cryptsetup.c | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index cd0cedf118..bfd71cd595 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -378,14 +378,13 @@ static int create_disk( else fprintf(f, "Requires=%s\n", unit); - if (umount_unit) { + if (umount_unit) fprintf(f, "Wants=%s\n" "Before=%s\n", umount_unit, umount_unit ); - } } if (!nofail) diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index 10472bde26..fb08b4a1a0 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -832,10 +832,9 @@ static int run(int argc, char *argv[]) { if (argc <= 1) return help(); - if (argc < 3) { - log_error("This program requires at least two arguments."); - return -EINVAL; - } + if (argc < 3) + return log_error_errno(SYNTHETIC_ERRNO(EINVAL), + "This program requires at least two arguments."); log_setup_service(); |