Use the formatted string, not the unformatted one.
authorWouter Verhelst <w@uter.be>
Wed, 21 Mar 2012 15:43:52 +0000 (16:43 +0100)
committerWouter Verhelst <w@uter.be>
Wed, 21 Mar 2012 15:43:52 +0000 (16:43 +0100)
nbd-client.c

index 943f3cecb8eca97d29cd272ec98839000eb7225a..7a8896e3b40bd606701f7eb2a2e44ebb76d386cc 100644 (file)
@@ -273,7 +273,7 @@ void usage(char* errmsg, ...) {
                va_list ap;
                va_start(ap, errmsg);
                snprintf(tmp, 256, "ERROR: %s\n\n", errmsg);
-               vfprintf(stderr, errmsg, ap);
+               vfprintf(stderr, tmp, ap);
                va_end(ap);
        } else {
                fprintf(stderr, "nbd-client version %s\n", PACKAGE_VERSION);