From ee9a860bc20ae7209134e8d55fdfe02d8e02b205 Mon Sep 17 00:00:00 2001 From: zodiac Date: Wed, 7 Jan 2009 23:53:14 +0000 Subject: [PATCH] Fixed a printf format error when compiling on 64bit. git-svn-id: https://shellinabox.googlecode.com/svn/trunk@31 0da03de8-d603-11dd-86c2-0f8696b7b6f9 --- shellinabox/shellinaboxd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shellinabox/shellinaboxd.c b/shellinabox/shellinaboxd.c index 24593ef..d7835b1 100644 --- a/shellinabox/shellinaboxd.c +++ b/shellinabox/shellinaboxd.c @@ -204,10 +204,10 @@ static int completePendingRequest(struct Session *session, "HTTP/1.1 200 OK\r\n" "Content-Type: application/json; " "charset=utf-8\r\n" - "Content-Length: %d\r\n" + "Content-Length: %ld\r\n" "\r\n" "%s", - strlen(json), + (long)strlen(json), strcmp(httpGetMethod(http), "HEAD") ? json : ""); free(json); @@ -412,9 +412,9 @@ static void serveStaticFile(HttpConnection *http, const char *contentType, char *response = stringPrintf(NULL, "HTTP/1.1 200 OK\r\n" "Content-Type: %s\r\n" - "Content-Length: %d\r\n" + "Content-Length: %ld\r\n" "\r\n", - contentType, end - start); + contentType, (long)(end - start)); int len = strlen(response); if (strcmp(httpGetMethod(http), "HEAD")) { check(response = realloc(response, len + (end - start)));