diff --git a/include/qb/qbdefs.h b/include/qb/qbdefs.h index 21d3627..25eb1bf 100644 --- a/include/qb/qbdefs.h +++ b/include/qb/qbdefs.h @@ -79,6 +79,10 @@ extern "C" { #define typeof __typeof__ #endif /* ANSI */ +#if defined (__GNUC__) && defined (__STRICT_ANSI__) +#define va_copy(_a, _b) *_a = *_b +#endif /* ANSI */ + #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) #define QB_GNUC_DEPRECATED \ __attribute__((__deprecated__)) diff --git a/lib/log_format.c b/lib/log_format.c index c370880..0cd07c7 100644 --- a/lib/log_format.c +++ b/lib/log_format.c @@ -371,13 +371,13 @@ qb_vsnprintf_deserialize(char *string, size_t str_len, const char *buf) location += p - &string[location] + 1; break; } - // copy from current to the next % + /* copy from current to the next % */ len = p - format; strncpy(&string[location], format, len); location += len; format = p; - // start building up the format for snprintf + /* start building up the format for snprintf */ fmt_pos = 0; fmt[fmt_pos++] = *format; format++;