empathy r2612 - trunk/libempathy
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r2612 - trunk/libempathy
- Date: Fri, 6 Mar 2009 11:53:11 +0000 (UTC)
Author: xclaesse
Date: Fri Mar 6 11:53:10 2009
New Revision: 2612
URL: http://svn.gnome.org/viewvc/empathy?rev=2612&view=rev
Log:
Use a single-line return statement instead of if/else if/else if.
Signed-off-by: Jonny Lamb <jonny lamb collabora co uk>
Modified:
trunk/libempathy/empathy-log-manager.c
Modified: trunk/libempathy/empathy-log-manager.c
==============================================================================
--- trunk/libempathy/empathy-log-manager.c (original)
+++ trunk/libempathy/empathy-log-manager.c Fri Mar 6 11:53:10 2009
@@ -269,20 +269,11 @@
EmpathyMessage *one = (EmpathyMessage *) a;
EmpathyMessage *two = (EmpathyMessage *) b;
time_t one_time, two_time;
- gint ret = 0;
one_time = empathy_message_get_timestamp (one);
two_time = empathy_message_get_timestamp (two);
- if (one_time < two_time) {
- ret = -1;
- } else if (one_time == two_time) {
- ret = 0;
- } else if (one_time > two_time) {
- ret = 1;
- }
-
- return ret;
+ return one_time < two_time ? -1 : one_time - two_time;
}
GList *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]