All of lore.kernel.org
 help / color / mirror / Atom feed
* master - cleanup: reoder rstatus init
@ 2015-11-09  9:29 Zdenek Kabelac
  0 siblings, 0 replies; only message in thread
From: Zdenek Kabelac @ 2015-11-09  9:29 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=22e19cb354d813e4be9a461c16bf27205c86d71e
Commit:        22e19cb354d813e4be9a461c16bf27205c86d71e
Parent:        b1dab26be0ee7eec11a6e91ab715808ddf016355
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Sun Nov 8 17:18:23 2015 +0100
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Mon Nov 9 10:22:52 2015 +0100

cleanup: reoder rstatus init

In all error paths always initialize *rstatus.
---
 lib/misc/lvm-exec.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/misc/lvm-exec.c b/lib/misc/lvm-exec.c
index e414524..a3a629b 100644
--- a/lib/misc/lvm-exec.c
+++ b/lib/misc/lvm-exec.c
@@ -53,14 +53,14 @@ int exec_cmd(struct cmd_context *cmd, const char *const argv[],
 	int status;
 	char buf[PATH_MAX * 2];
 
+	if (rstatus)
+		*rstatus = -1;
+
 	if (!argv[0]) {
 		log_error(INTERNAL_ERROR "Missing command.");
 		return 0;
 	}
 
-	if (rstatus)
-		*rstatus = -1;
-
 	if (sync_needed)
 		/* Flush ops and reset dm cookie */
 		if (!sync_local_dev_names(cmd)) {



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-09  9:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-09  9:29 master - cleanup: reoder rstatus init Zdenek Kabelac

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.