summaryrefslogtreecommitdiff
path: root/src/cryptsetup/cryptsetup.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-02-01 09:04:27 -0500
committerMartin Pitt <martinpitt@users.noreply.github.com>2017-02-01 15:04:27 +0100
commit785d345145bbd06c8f1c75c6a0b119c4e8f411db (patch)
tree207446c896cd6006f0efde1e72919cb6bc208e92 /src/cryptsetup/cryptsetup.c
parent1a68e1e543fd8f899503bec00585a16ada296ef7 (diff)
Trivial typo fixes and code refactorings (#5191)
* logind: trivial simplification free_and_strdup() handles NULL arg, so make use of that. * boot: fix two typos * pid1: rewrite check in ignore_proc() to not check condition twice It's harmless, but it seems nicer to evaluate a condition just a single time. * core/execute: reformat exec_context_named_iofds() for legibility * core/execute.c: check asprintf return value in the usual fashion This is unlikely to fail, but we cannot rely on asprintf return value on failure, so let's just be correct here. CID #1368227. * core/timer: use (void) CID #1368234. * journal-file: check asprintf return value in the usual fashion This is unlikely to fail, but we cannot rely on asprintf return value on failure, so let's just be correct here. CID #1368236. * shared/cgroup-show: use (void) CID #1368243. * cryptsetup: do not return uninitialized value on error CID #1368416.
Diffstat (limited to 'src/cryptsetup/cryptsetup.c')
-rw-r--r--src/cryptsetup/cryptsetup.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
index cefd1b85df..91c653312a 100644
--- a/src/cryptsetup/cryptsetup.c
+++ b/src/cryptsetup/cryptsetup.c
@@ -594,7 +594,7 @@ static int help(void) {
int main(int argc, char *argv[]) {
struct crypt_device *cd = NULL;
- int r;
+ int r = -EINVAL;
if (argc <= 1) {
r = help();
@@ -603,7 +603,6 @@ int main(int argc, char *argv[]) {
if (argc < 3) {
log_error("This program requires at least two arguments.");
- r = -EINVAL;
goto finish;
}
@@ -750,7 +749,6 @@ int main(int argc, char *argv[]) {
} else {
log_error("Unknown verb %s.", argv[1]);
- r = -EINVAL;
goto finish;
}