pidgin: 33fc08cc: Use unsigned lengths here and use %zu wh...

markdoliner at pidgin.im markdoliner at pidgin.im
Thu Jul 2 02:11:00 EDT 2009


-----------------------------------------------------------------
Revision: 33fc08cc4dcaca950a8c6025d010881434fe8fb6
Ancestor: c6a588701073dae6f4d604aa3df792c3b114c22e
Author: markdoliner at pidgin.im
Date: 2009-07-02T06:08:36
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/33fc08cc4dcaca950a8c6025d010881434fe8fb6

Modified files:
        libpurple/util.c

ChangeLog: 

Use unsigned lengths here and use %zu when reading into the gsize var

-------------- next part --------------
============================================================
--- libpurple/util.c	8b32af963f76ffd1a485fd0d75e7c7b8cf78057e
+++ libpurple/util.c	9a99dde784d616109ee8c3156036822961cffea2
@@ -3786,15 +3786,15 @@ static void
 
 /* Process in-place */
 static void
-process_chunked_data(char *data, gssize *len)
+process_chunked_data(char *data, gsize *len)
 {
-	gssize sz;
-	gssize nlen = 0;
+	gsize sz;
+	gsize nlen = 0;
 	char *p = data;
 	char *s = data;
 
 	while (*s) {
-		if (sscanf(s, "%x\r\n", &sz) != 1) {
+		if (sscanf(s, "%" G_GSIZE_MODIFIER "x\r\n", &sz) != 1) {
 			purple_debug_error("util", "Error processing chunked data. Expected data length, found: %s\n", s);
 			break;
 		}


More information about the Commits mailing list