use %ld to printf now.tv_sec
authorDaniel Stenberg <daniel@haxx.se>
Thu, 6 May 2004 07:21:19 +0000 (07:21 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 6 May 2004 07:21:19 +0000 (07:21 +0000)
lib/http_digest.c

index 35ba171..b619bd1 100644 (file)
@@ -239,7 +239,7 @@ CURLcode Curl_output_digest(struct connectdata *conn,
   if(!d->cnonce) {
     /* Generate a cnonce */
     now = Curl_tvnow();
-    snprintf(cnoncebuf, sizeof(cnoncebuf), "%06d", now.tv_sec);
+    snprintf(cnoncebuf, sizeof(cnoncebuf), "%06ld", now.tv_sec);
     Curl_base64_encode(cnoncebuf, strlen(cnoncebuf), &cnonce);
     d->cnonce = cnonce;
   }