Fixed logs missing a single character when called with skygw_log_write_flush.

This commit is contained in:
Markus Makela 2015-02-23 20:26:19 +02:00
parent 7afc9b5332
commit 4f108af0fb

View File

@ -1364,12 +1364,12 @@ int skygw_log_write_flush(
* Find out the length of log string (to be formatted str).
*/
va_start(valist, str);
len = vsnprintf(NULL, 0, str, valist);
len = sizeof(char) * vsnprintf(NULL, 0, str, valist);
va_end(valist);
/**
* Add one for line feed.
*/
len += 1;
len += sizeof(char);
/**
* Write log string to buffer and add to file write list.
*/