master - cleanup: reoder rstatus init
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=22e19cb354d813e4be9a461c16bf27205c86d71e Commit: 22e19cb354d813e4be9a461c16bf27205c86d71e Parent: b1dab26be0ee7eec11a6e91ab715808ddf016355 Author: Zdenek Kabelac <[email protected]> AuthorDate: Sun Nov 8 17:18:23 2015 +0100 Committer: Zdenek Kabelac <[email protected]> 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(-)
lib/misc/lvm-exec.c +3 -3
@@ -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)) {