1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

cleanup: reindent

Save some code lines.
This commit is contained in:
Zdenek Kabelac 2014-09-23 16:47:27 +02:00
parent 3cef6dd721
commit 03aeb86762
2 changed files with 4 additions and 7 deletions

View File

@ -583,7 +583,7 @@ int module_present(struct cmd_context *cmd, const char *target_name)
int ret = 0; int ret = 0;
#ifdef MODPROBE_CMD #ifdef MODPROBE_CMD
char module[128]; char module[128];
const char *argv[3]; const char *argv[] = { MODPROBE_CMD, module, NULL };
if (dm_snprintf(module, sizeof(module), "dm-%s", target_name) < 0) { if (dm_snprintf(module, sizeof(module), "dm-%s", target_name) < 0) {
log_error("module_present module name too long: %s", log_error("module_present module name too long: %s",
@ -591,10 +591,6 @@ int module_present(struct cmd_context *cmd, const char *target_name)
return 0; return 0;
} }
argv[0] = MODPROBE_CMD;
argv[1] = module;
argv[2] = NULL;
ret = exec_cmd(cmd, argv, NULL, 0); ret = exec_cmd(cmd, argv, NULL, 0);
#endif #endif
return ret; return ret;

View File

@ -40,8 +40,9 @@ static int _monitor_lvs_in_vg(struct cmd_context *cmd,
if (!monitor_dev_for_events(cmd, lv, 0, reg)) { if (!monitor_dev_for_events(cmd, lv, 0, reg)) {
r = 0; r = 0;
continue; continue;
} else }
(*count)++;
(*count)++;
} }
return r; return r;