src/utils_cache.c: Fix timeout checking.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sun, 31 Oct 2010 13:41:43 +0000 (14:41 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sun, 31 Oct 2010 13:41:43 +0000 (14:41 +0100)
src/utils_cache.c

index c9a5f7a..05db70c 100644 (file)
@@ -319,7 +319,8 @@ int uc_check_timeout (void)
   while (c_avl_iterator_next (iter, (void *) &key, (void *) &ce) == 0)
   {
     /* If entry has not been updated, add to `keys' array */
-    if ((now - ce->last_update) >= (timeout_g * ce->interval))
+    /* FIXME: Remove macro once "ce->interval" is of type cdtime_t. */
+    if ((now - ce->last_update) >= TIME_T_TO_CDTIME_T (timeout_g * ce->interval))
     {
       char **tmp;