LOG: fix ansi build

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
Angus Salkeld 2011-08-22 14:09:11 +10:00
parent 94767b18b8
commit e1be00130c
2 changed files with 6 additions and 2 deletions

View File

@ -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__))

View File

@ -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++;