/pidgin/main: 905d15638e6c: No need to explicitly compare agains...

Mark Doliner mark at kingant.net
Fri Dec 6 03:18:29 EST 2013


Changeset: 905d15638e6ce357ab48b0dea4dd807e57d1fdf3
Author:	 Mark Doliner <mark at kingant.net>
Date:	 2013-12-06 00:18 -0800
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/905d15638e6c

Description:

No need to explicitly compare against TRUE (or FALSE).

I know we do this a lot of other places in our code. I mostly wanted
to change this one so I can say that I prefer not comparing against
TRUE or FALSE explicitly :-)

In c I think it's fine and a little more readable to keep it simple and
do something like "if (blah)"

diffstat:

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

diffs (12 lines):

diff --git a/libpurple/conversationtypes.c b/libpurple/conversationtypes.c
--- a/libpurple/conversationtypes.c
+++ b/libpurple/conversationtypes.c
@@ -1380,7 +1380,7 @@ purple_chat_conversation_set_property(GO
 		case CHAT_PROP_LEFT:
 			{
 				gboolean left = g_value_get_boolean(value);
-				if (left == TRUE)
+				if (left)
 					purple_chat_conversation_leave(chat);
 			}
 			break;



More information about the Commits mailing list