]> granicus.if.org Git - libevent/commitdiff
fix signed/unsigned warnings in http.c
authorNick Mathewson <nickm@torproject.org>
Mon, 1 Nov 2010 18:16:39 +0000 (14:16 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 1 Nov 2010 18:16:39 +0000 (14:16 -0400)
http.c

diff --git a/http.c b/http.c
index 5222aeff39eec12253ec6c9f1fc55a6b579dbc1d..f13c22e08309faf4f4f0ae6bb1d7d7df55121777 100644 (file)
--- a/http.c
+++ b/http.c
@@ -240,7 +240,7 @@ html_replace(char ch, char *buf)
 char *
 evhttp_htmlescape(const char *html)
 {
-       int i;
+       size_t i;
        size_t new_size = 0, old_size = strlen(html);
        char *escaped_html, *p;
        char scratch_space[2];
@@ -250,7 +250,7 @@ evhttp_htmlescape(const char *html)
 
        p = escaped_html = mm_malloc(new_size + 1);
        if (escaped_html == NULL) {
-               event_warn("%s: malloc(%d)", __func__, new_size + 1);
+               event_warn("%s: malloc(%ld)", __func__, (long)(new_size + 1));
                return (NULL);
        }
        for (i = 0; i < old_size; ++i) {