Fixing log_win32.c

pull/24/head
Nicolas "Pixel" Noble 10 years ago
parent 6ba50fde9c
commit 848e74441e
  1. 9
      src/core/support/log_win32.c

@ -36,12 +36,13 @@
#ifdef GPR_WIN32
#include <grpc/support/log.h>
#include <grpc/support/alloc.h>
#include <stdio.h>
#include <stdarg.h>
void gpr_log(const char *file, int line, gpr_log_severity severity,
const char *message) {
const char *message = NULL;
const char *format, ...) {
char *message = NULL;
va_list args;
int ret;
@ -53,7 +54,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity,
message = NULL;
} else {
/* Allocate a new buffer, with space for the NUL terminator. */
strp_buflen = (size_t)ret + 1;
size_t strp_buflen = (size_t)ret + 1;
message = gpr_malloc(strp_buflen);
/* Print to the buffer. */
@ -73,7 +74,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity,
/* Simple starter implementation */
void gpr_default_log(gpr_log_func_args *args) {
fprintf(stderr, "%s %s:%d: %s\n", gpr_log_severity_string(severity),
fprintf(stderr, "%s %s:%d: %s\n", gpr_log_severity_string(args->severity),
args->file, args->line, args->message);
}

Loading…
Cancel
Save