Hi Elena,

while removing the floor(), we could also get rid of ceil() call,

On 05/15/2012 03:37 PM, Elena Tebesoi wrote:
Hi Jukka,

        +static gboolean resolver_refresh_cb(gpointer user_data)
        +{
        +       struct entry_data *entry = user_data;
        +       int index;
        +       unsigned int interval;
        +       struct connman_service *service = NULL;
        +
        +       interval = ceil(entry->lifetime *
        +                       (1 -
        RESOLVER_LIFETIME_REFRESH___THRESHOLD));


so we could do it like this

interval = entry->lifetime * (1 - RESOLVER_LIFETIME_REFRESH_THRESHOLD) + 1.0;

then we would not need to include math.h


Cheers,
Jukka


_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to