Skip to contentSkip to conversation

dtc: Fix FAIL() macro varargs

PATCH Applied David Gibson 2 participants 2 messages Dec 4, 2007 – Dec 5, 2007

lore
Share & tools
lore
#0 lore raw

The way the checking subsystem FAIL() macro is currently implemented it must take at least one paramater after the format string. This patch corrects the problem.

checks.c +2 -2
Index: dtc/checks.c
===================================================================
@@ -101,11 +101,11 @@ static inline void check_msg(struct chec
 	fprintf(stderr, "\n");
 }
 
-#define FAIL(c, fmt, ...) \
+#define FAIL(c, ...) \
 	do { \
 		TRACE((c), "\t\tFAILED at %s:%d", __FILE__, __LINE__); \
 		(c)->status = FAILED; \
-		check_msg((c), fmt, __VA_ARGS__); \
+		check_msg((c), __VA_ARGS__); \
 	} while (0)
 
 static void check_nodes_props(struct check *c, struct node *dt, struct node *node)
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
Applied
#1 lore raw

So, like, the other day David Gibson mumbled:

Quoted 5 lines

The way the checking subsystem FAIL() macro is currently implemented it must take at least one paramater after the format string. This patch corrects the problem.

Applied.

jdl