From: Zbigniew Jędrzejewski-Szmek Date: Tue, 31 Jan 2017 19:01:53 +0000 (-0500) Subject: cryptsetup: do not return uninitialized value on error X-Git-Tag: v233~186^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=81a6ac6cf6622b4938fe18b55ebafbe8b5bbd29e;p=thirdparty%2Fsystemd.git cryptsetup: do not return uninitialized value on error CID #1368416. --- diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index cefd1b85dfa..91c653312ac 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; }