pidgin: 52e5d841: Fix two warnings introduced by the image...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Sun Nov 23 02:35:27 EST 2008


-----------------------------------------------------------------
Revision: 52e5d841d66390cfc5a59e356e2a53b2e2b9df8a
Ancestor: d28765a18f6ef224d8d79e2f8821850ea789007f
Author: rekkanoryo at pidgin.im
Date: 2008-11-23T06:19:09
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/52e5d841d66390cfc5a59e356e2a53b2e2b9df8a

Modified files:
        libpurple/protocols/gg/gg.c

ChangeLog: 

Fix two warnings introduced by the image patch I committed earlier and make
one minor tweak.

-------------- next part --------------
============================================================
--- libpurple/protocols/gg/gg.c	4b8e6eb0f63986ecf3ecf3d0cca4898d5339451b
+++ libpurple/protocols/gg/gg.c	cd0d2a18fef8959b39fd8a39a5e3172f5ace63db
@@ -1347,7 +1347,7 @@ static void ggp_send_image_handler(Purpl
 {
 	GGPInfo *info = gc->proto_data;
 	PurpleStoredImage *image;
-	gint imgid = (gint) g_hash_table_lookup(info->pending_images, &ev->event.image_request.crc32);
+	gint imgid = GPOINTER_TO_INT(g_hash_table_lookup(info->pending_images, &ev->event.image_request.crc32));
 
 	purple_debug_info("gg", "ggp_send_image_handler: image request received, crc32: %u\n", ev->event.image_request.crc32);
 
@@ -1841,7 +1841,7 @@ static int ggp_send_im(PurpleConnection 
 	GData *attribs;
 	const char *start, *end = NULL, *last;
 
-	if (msg == NULL || *msg == 0) {
+	if (msg == NULL || *msg == '\0') {
 		return 0;
 	}
 
@@ -1872,7 +1872,7 @@ static int ggp_send_im(PurpleConnection 
 				const char *image_filename = purple_imgstore_get_filename(image);
 				uint32_t crc32 = gg_crc32(0, image_bin, image_size);
 
-				g_hash_table_insert(info->pending_images, &crc32, (gpointer)atoi(id));
+				g_hash_table_insert(info->pending_images, &crc32, GINT_TO_POINTER(atoi(id)));
 				purple_imgstore_ref(image);
 				purple_debug_info("gg", "ggp_send_im_richtext: got crc: %i for imgid: %i\n", crc32, atoi(id));
 


More information about the Commits mailing list