Adding va_end().
Signed-off-by: Richard Knutsson <[EMAIL PROTECTED]>
---
According to the manual, it needs a va_end() in the same function.
diff --git a/expression.c b/expression.c
index 77d665d..857ec08 100644
--- a/expression.c
+++ b/expression.c
@@ -30,15 +30,15 @@
static int match_oplist(int op, ...)
{
va_list args;
+ int nextop;
va_start(args, op);
- for (;;) {
- int nextop = va_arg(args, int);
- if (!nextop)
- return 0;
- if (op == nextop)
- return 1;
- }
+ do {
+ nextop = va_arg(args, int);
+ } while (nextop != 0 && nextop != op);
+ va_end(args);
+
+ return nextop != 0;
}
static struct token *comma_expression(struct token *, struct expression **);
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html