From 463da8090254f6077f30a8e5274dd6a5908bb2bc Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Tue, 28 Aug 2018 18:58:27 -0500 Subject: [PATCH] Small tweaks to . *Use a typedef rather than a macro definition for va_list. (The C standards specify that va_list is a type, although this would make a practical difference only if someone #undef'd it.) *Don't include a semicolon in va_start(), so it expands to an expression rather than a statement. This could make a difference in a construct like "if (...) va_start(...); else ...". --- ORCACDefs/stdarg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ORCACDefs/stdarg.h b/ORCACDefs/stdarg.h index c32c394..5b579f5 100644 --- a/ORCACDefs/stdarg.h +++ b/ORCACDefs/stdarg.h @@ -24,9 +24,9 @@ typedef char *__va_list[2]; #endif -#define va_list __va_list +typedef __va_list va_list; #define va_end(a) __va_end(a) -#define va_start(ap,LastFixedParm) ((void) ((ap)[0] = (ap)[1] = (char *) (&LastFixedParm + 1))); +#define va_start(ap,LastFixedParm) ((void) ((ap)[0] = (ap)[1] = (char *) (&LastFixedParm + 1))) #define va_arg(ap,type) ((type *)((ap)[0] += sizeof(type)))[-1] void __va_end(va_list);