aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-03-06 19:11:13 +0100
committerMarkus Armbruster <armbru@redhat.com>2015-06-02 09:59:14 +0200
commit452e0300a3521f13b6c4ba0b99a8cea3a29209f1 (patch)
tree9acc6d95e9b6f97917c37e6810bc4d065fd0b54e /monitor.c
parent70ea0c58991ae44b5a1e67d9c189d79029168cb1 (diff)
monitor: Inline monitor_has_error() into its only caller
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/monitor.c b/monitor.c
index 56564d5bef..91f8a4e5d7 100644
--- a/monitor.c
+++ b/monitor.c
@@ -377,11 +377,6 @@ static int GCC_FMT_ATTR(2, 3) monitor_fprintf(FILE *stream,
return 0;
}
-static inline int monitor_has_error(const Monitor *mon)
-{
- return mon->error != NULL;
-}
-
static void monitor_json_emitter(Monitor *mon, const QObject *data)
{
QString *json;
@@ -5031,7 +5026,7 @@ static void handle_qmp_command(JSONMessageParser *parser, QList *tokens)
if (cmd->mhandler.cmd_new(mon, args, &data)) {
/* Command failed... */
- if (!monitor_has_error(mon)) {
+ if (!mon->error) {
/* ... without setting an error, so make one up */
qerror_report(QERR_UNDEFINED_ERROR);
}