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

Koosha Khajehmoogahi <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: 5f0f9375f8cccd81c3844753cac7a99bc08f8f46
Author:	 Koosha Khajehmoogahi <[email protected]>
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++;

_______________________________________________
Commits mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.