summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-03-16 01:20:35 +0000
committerIan Lynagh <igloo@earth.li>2012-03-16 01:20:35 +0000
commitca0fcb34d1e246b761f146da77a5bd12b7d2b4b1 (patch)
tree5cc6a7fbf967fc1aa13cc707ca4b619dc665fd9a /driver
parent84ccbea7baa757c2f39ced499a971f3f7857a897 (diff)
downloadhaskell-ca0fcb34d1e246b761f146da77a5bd12b7d2b4b1.tar.gz
Fix a tiny bug in cwrapper.c
Caught by -Werror
Diffstat (limited to 'driver')
-rw-r--r--driver/utils/cwrapper.c6
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));
}