/soc/2015/koosha/main: 5f0f9375f8cc: having stanzas_recvd equal ...

Koosha Khajehmoogahi koosha at posteo.de
Mon Aug 10 11:12:46 EDT 2015


Changeset: 5f0f9375f8cccd81c3844753cac7a99bc08f8f46
Author:	 Koosha Khajehmoogahi <koosha at posteo.de>
Date:	 2015-08-10 17:11 +0200
Branch:	 default
URL: https://hg.pidgin.im/soc/2015/koosha/main/rev/5f0f9375f8cc

Description:

having stanzas_recvd equal to G_MAXUINT32 is extremely unlikely; use G_UNLIKELY

diffstat:

 libpurple/protocols/jabber/jabber.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c
--- a/libpurple/protocols/jabber/jabber.c
+++ b/libpurple/protocols/jabber/jabber.c
@@ -398,7 +398,7 @@ void jabber_process_packet(JabberStream 
 	    purple_strequal(name, "presence") ||
 	    purple_strequal(name, "message"))
 	{
-		if (G_MAXUINT32 == js->stanzas_recvd)
+		if (G_UNLIKELY(G_MAXUINT32 == js->stanzas_recvd))
 			js->stanzas_recvd = 0;
 		else
 			js->stanzas_recvd++;



More information about the Commits mailing list