From: Hallvard Furuseth Date: Tue, 23 Nov 2010 10:10:45 +0000 (+0000) Subject: ITS#6721: Fix uninitialized tv_usec from ITS#6282 X-Git-Tag: MIGRATION_CVS2GIT~402 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4484781b0de3a5f72536a5f2c03665f83411f570;p=openldap ITS#6721: Fix uninitialized tv_usec from ITS#6282 --- diff --git a/servers/slapd/back-ldap/config.c b/servers/slapd/back-ldap/config.c index 7b5cb291f1..b658524a3e 100644 --- a/servers/slapd/back-ldap/config.c +++ b/servers/slapd/back-ldap/config.c @@ -2339,8 +2339,7 @@ retry: rs->sr_err = ldap_whoami( lc->lc_ld, ctrls, NULL, &msgid ); if ( rs->sr_err == LDAP_SUCCESS ) { /* by now, make sure no timeout is used (ITS#6282) */ - struct timeval tv; - tv.tv_sec = -1; + struct timeval tv = { -1, 0 }; if ( ldap_result( lc->lc_ld, msgid, LDAP_MSG_ALL, &tv, &res ) == -1 ) { ldap_get_option( lc->lc_ld, LDAP_OPT_ERROR_NUMBER, &rs->sr_err ); diff --git a/servers/slapd/back-ldap/extended.c b/servers/slapd/back-ldap/extended.c index 293e24e0a8..12570e72d5 100644 --- a/servers/slapd/back-ldap/extended.c +++ b/servers/slapd/back-ldap/extended.c @@ -191,8 +191,7 @@ retry: if ( rc == LDAP_SUCCESS ) { /* TODO: set timeout? */ /* by now, make sure no timeout is used (ITS#6282) */ - struct timeval tv; - tv.tv_sec = -1; + struct timeval tv = { -1, 0 }; if ( ldap_result( lc->lc_ld, msgid, LDAP_MSG_ALL, &tv, &res ) == -1 ) { ldap_get_option( lc->lc_ld, LDAP_OPT_ERROR_NUMBER, &rc ); rs->sr_err = rc; @@ -320,8 +319,7 @@ retry: if ( rc == LDAP_SUCCESS ) { /* TODO: set timeout? */ /* by now, make sure no timeout is used (ITS#6282) */ - struct timeval tv; - tv.tv_sec = -1; + struct timeval tv = { -1, 0 }; if ( ldap_result( lc->lc_ld, msgid, LDAP_MSG_ALL, &tv, &res ) == -1 ) { ldap_get_option( lc->lc_ld, LDAP_OPT_ERROR_NUMBER, &rc ); rs->sr_err = rc;