/soc/2015/jgeboski/facebook: a9b5c6e0462d: facebook: do not usel...

James Geboski jgeboski at gmail.com
Sat Aug 15 16:25:46 EDT 2015


Changeset: a9b5c6e0462df8a61afcfc0783a424272fc697bf
Author:	 James Geboski <jgeboski at gmail.com>
Date:	 2015-08-15 14:12 -0400
Branch:	 facebook
URL: https://hg.pidgin.im/soc/2015/jgeboski/facebook/rev/a9b5c6e0462d

Description:

facebook: do not uselessly nullify MQTT message values

diffstat:

 libpurple/protocols/facebook/mqtt.c |  12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)

diffs (36 lines):

diff --git a/libpurple/protocols/facebook/mqtt.c b/libpurple/protocols/facebook/mqtt.c
--- a/libpurple/protocols/facebook/mqtt.c
+++ b/libpurple/protocols/facebook/mqtt.c
@@ -884,10 +884,6 @@ fb_mqtt_message_read_r(FbMqttMessage *ms
 gboolean
 fb_mqtt_message_read_byte(FbMqttMessage *msg, guint8 *byte)
 {
-	if (byte != NULL) {
-		*byte = 0;
-	}
-
 	return fb_mqtt_message_read(msg, byte, sizeof *byte);
 }
 
@@ -901,10 +897,6 @@ gboolean
 fb_mqtt_message_read_u16(FbMqttMessage *msg, guint16 *u16)
 {
 	if (!fb_mqtt_message_read(msg, u16, sizeof *u16)) {
-		if (u16 != NULL) {
-			*u16 = 0;
-		}
-
 		return FALSE;
 	}
 
@@ -921,10 +913,6 @@ fb_mqtt_message_read_str(FbMqttMessage *
 	guint8 *data;
 	guint16 size;
 
-	if (str != NULL) {
-		*str = NULL;
-	}
-
 	if (!fb_mqtt_message_read_u16(msg, &size)) {
 		return FALSE;
 	}



More information about the Commits mailing list