mirror of
https://github.com/troglobit/finit.git
synced 2026-10-07 08:04:22 +07:00
Refactor, simplify ... print() APIs already check if silent
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
+2
-2
@@ -161,7 +161,7 @@ int run_interactive(char *cmd, char *fmt, ...)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!silent && fmt) {
|
||||
if (fmt) {
|
||||
va_start(ap, fmt);
|
||||
vsnprintf(line, sizeof(line), fmt, ap);
|
||||
va_end(ap);
|
||||
@@ -193,7 +193,7 @@ int run_interactive(char *cmd, char *fmt, ...)
|
||||
}
|
||||
}
|
||||
|
||||
if (!silent && fmt)
|
||||
if (fmt)
|
||||
print_result(status);
|
||||
|
||||
/* Dump any results of cmd on stderr after we've printed [ OK ] or [FAIL] */
|
||||
|
||||
Reference in New Issue
Block a user