From: Hallvard Furuseth Date: Fri, 18 May 2007 14:45:56 +0000 (+0000) Subject: Warning cleanup (avoid cast double return val -> integer, gcc gets suspicious) X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~466 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4caf7faa74c184f92c99a15d40c51af48a6e75ce;p=openldap Warning cleanup (avoid cast double return val -> integer, gcc gets suspicious) --- diff --git a/servers/slapd/back-monitor/time.c b/servers/slapd/back-monitor/time.c index 0b7653a50e..f3450d8315 100644 --- a/servers/slapd/back-monitor/time.c +++ b/servers/slapd/back-monitor/time.c @@ -242,6 +242,7 @@ monitor_subsys_time_update( } else if ( dn_match( &rdn, &bv_uptime ) ) { Attribute *a; + double diff; char buf[ BACKMONITOR_BUFSIZE ]; struct berval bv; @@ -250,8 +251,9 @@ monitor_subsys_time_update( return rs->sr_err = LDAP_OTHER; } + diff = difftime( slap_get_time(), starttime ); bv.bv_len = snprintf( buf, sizeof( buf ), "%lu", - (unsigned long)difftime( slap_get_time(), starttime ) ); + (unsigned long) diff ); bv.bv_val = buf; ber_bvreplace( &a->a_vals[ 0 ], &bv );