aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy/empathy-log-manager.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/libempathy/empathy-log-manager.c b/libempathy/empathy-log-manager.c
index b8a346268..196519a59 100644
--- a/libempathy/empathy-log-manager.c
+++ b/libempathy/empathy-log-manager.c
@@ -269,20 +269,11 @@ log_manager_sort_message_by_date (gconstpointer a,
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 *