Skip to content

Commit

Permalink
sysbus: Supply missing va_end()
Browse files Browse the repository at this point in the history
C99 7.15.1: Each invocation of the va_start and va_copy macros shall
be matched by a corresponding invocation of the va_end macro in the
same function.

Spotted by Coverity.  Harmless on the (common) systems where va_end()
does nothing.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
  • Loading branch information
Markus Armbruster authored and Stefan Hajnoczi committed Nov 1, 2011
1 parent 93a7320 commit d0bc5bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hw/sysbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ DeviceState *sysbus_create_varargs(const char *name,
sysbus_connect_irq(s, n, irq);
n++;
}
va_end(va);
return dev;
}

Expand Down Expand Up @@ -229,6 +230,7 @@ DeviceState *sysbus_try_create_varargs(const char *name,
sysbus_connect_irq(s, n, irq);
n++;
}
va_end(va);
return dev;
}

Expand Down

0 comments on commit d0bc5bc

Please sign in to comment.