diff options
Diffstat (limited to 'driver/utils')
-rw-r--r-- | driver/utils/cwrapper.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/driver/utils/cwrapper.c b/driver/utils/cwrapper.c index 911290224c..5105924b74 100644 --- a/driver/utils/cwrapper.c +++ b/driver/utils/cwrapper.c @@ -31,7 +31,7 @@ char *mkString(const char *fmt, ...) { va_end(argp); if (i < 0) { - die("snprintf 0 failed: errno %d: %s\n", errno, strerror(errno)); + die("vsnprintf 0 failed: errno %d: %s\n", errno, strerror(errno)); } p = malloc(i + 1); @@ -42,8 +42,8 @@ char *mkString(const char *fmt, ...) { va_start(argp, fmt); j = vsnprintf(p, i + 1, fmt, argp); va_end(argp); - if (i < 0) { - die("snprintf with %d failed: errno %d: %s\n", + if (j < 0) { + die("vsnprintf with %d failed: errno %d: %s\n", i + 1, errno, strerror(errno)); } |