Skip to content

Commit

Permalink
monitor: assert monitor_puts()'s loop invariant
Browse files Browse the repository at this point in the history
Chiefly to hush up Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
  • Loading branch information
Markus Armbruster authored and Luiz Capitulino committed Jan 10, 2013
1 parent 6ad53bd commit 5178234
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions monitor.c
Expand Up @@ -270,6 +270,7 @@ static void monitor_puts(Monitor *mon, const char *str)
char c;

for(;;) {
assert(mon->outbuf_index < sizeof(mon->outbuf) - 1);
c = *str++;
if (c == '\0')
break;
Expand Down

0 comments on commit 5178234

Please sign in to comment.