- vsnprintf(message, sizeof(message), format, ap);
- ReportEvent(loghandle, priority, 0, 0, NULL, 1, 0, &message, NULL);
+ const char *messages[] = {message};
+ vsnprintf(message, sizeof message, format, ap);
+ ReportEvent(loghandle, priority, 0, 0, NULL, 1, 0, messages, NULL);