The prohibit_newline_at_end_of_diagnostic syntax check is confused when
another unrelated translatable message with a newline is too close to
the function it is supposed to check. Refactoring the code to make the
two strings further apart seems like the easiest solution.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
return ret;
cleanup:
- if (!ret) {
- vshError(ctl, "%s", _("Failed to detach interface"));
- } else {
+ if (ret) {
vshPrintExtra(ctl, "%s", _("Interface detached successfully\n"));
+ return true;
}
- return ret;
+
+ vshError(ctl, "%s", _("Failed to detach interface"));
+ return false;
}
result = virDomainRevertToSnapshot(snapshot, flags);
}
- if (result < 0)
+ if (result < 0) {
vshError(ctl, _("Failed to revert snapshot %1$s"), name);
- else
- vshPrintExtra(ctl, _("Domain snapshot %1$s reverted\n"), name);
- return result >= 0;
+ return false;
+ }
+
+ vshPrintExtra(ctl, _("Domain snapshot %1$s reverted\n"), name);
+ return true;
}
/*