Skip to content

Commit

Permalink
monitor: Inline monitor_has_error() into its only caller
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
  • Loading branch information
Markus Armbruster committed Jun 2, 2015
1 parent 70ea0c5 commit 452e030
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions monitor.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 452e030

Please sign in to comment.