]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldap/extended.c
ITS#6721: Fix uninitialized tv_usec from ITS#6282
[openldap] / servers / slapd / back-ldap / extended.c
index 293e24e0a8aae1b54649b656a72dc479d2eedece..12570e72d5e39a57142c225ec4c3a8b51435c466 100644 (file)
@@ -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;