From: <svn...@op...> - 2010-08-31 04:13:45
|
Author: cdfrey Date: Tue Aug 31 06:13:36 2010 New Revision: 6107 URL: http://www.opensync.org/changeset/6107 Log: Fixed comparison in timestamp_cmp() If NULL pointers are passed in, consider them as empty, and compare accordingly. Modified: plugins/google-calendar/src/gcalendar.c Modified: plugins/google-calendar/src/gcalendar.c ============================================================================== --- plugins/google-calendar/src/gcalendar.c Tue Aug 31 06:13:28 2010 (r6106) +++ plugins/google-calendar/src/gcalendar.c Tue Aug 31 06:13:36 2010 (r6107) @@ -82,8 +82,12 @@ time_t t_first, t_second; int result = 0; - if (!timestamp1 || !timestamp2) + if (!timestamp1 && !timestamp2) + return 0; + if (!timestamp2) return 1; + if (!timestamp1) + return -1; // From timestamp string to time structure timestamp2tm(timestamp1, format, &first); |