diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2009-03-06 19:53:10 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2009-03-06 19:53:10 +0800 |
commit | f0cd7a19b1b32bd31b587342c6f3a6b17c79458d (patch) | |
tree | 075590c8b99f83346cd2e07f459736f60e86988e /libempathy/empathy-log-manager.c | |
parent | 248fc44bce906d799cad23b152e2dba8f0f13789 (diff) | |
download | gsoc2013-empathy-f0cd7a19b1b32bd31b587342c6f3a6b17c79458d.tar gsoc2013-empathy-f0cd7a19b1b32bd31b587342c6f3a6b17c79458d.tar.gz gsoc2013-empathy-f0cd7a19b1b32bd31b587342c6f3a6b17c79458d.tar.bz2 gsoc2013-empathy-f0cd7a19b1b32bd31b587342c6f3a6b17c79458d.tar.lz gsoc2013-empathy-f0cd7a19b1b32bd31b587342c6f3a6b17c79458d.tar.xz gsoc2013-empathy-f0cd7a19b1b32bd31b587342c6f3a6b17c79458d.tar.zst gsoc2013-empathy-f0cd7a19b1b32bd31b587342c6f3a6b17c79458d.zip |
Use a single-line return statement instead of if/else if/else if.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
svn path=/trunk/; revision=2612
Diffstat (limited to 'libempathy/empathy-log-manager.c')
-rw-r--r-- | libempathy/empathy-log-manager.c | 11 |
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 * |