]> granicus.if.org Git - php/commitdiff
MFH: No need to NULL terminate manually, snprintf() does it for us already.
authorIlia Alshanetsky <iliaa@php.net>
Tue, 1 Jun 2004 21:05:33 +0000 (21:05 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 1 Jun 2004 21:05:33 +0000 (21:05 +0000)
ext/ldap/ldap.c

index 49e3125b93b29b696cbd62c5631062d0da790c7f..8ec7a7339c8822ddb0fbf3abca1ab224c735e8eb 100644 (file)
@@ -293,12 +293,10 @@ PHP_MINFO_FUNCTION(ldap)
        } else {
                snprintf(tmp, 31, "%ld/%ld", LDAPG(num_links), LDAPG(max_links));
        }
-       tmp[31] = '\0';
        php_info_print_table_row(2, "Total Links", tmp);
 
 #ifdef LDAP_API_VERSION
        snprintf(tmp, 31, "%d", LDAP_API_VERSION);
-       tmp[31] = '\0';
        php_info_print_table_row(2, "API Version", tmp);
 #endif
 
@@ -308,27 +306,22 @@ PHP_MINFO_FUNCTION(ldap)
 
 #ifdef LDAP_VENDOR_VERSION
        snprintf(tmp, 31, "%d", LDAP_VENDOR_VERSION);
-       tmp[31] = '\0';
        php_info_print_table_row(2, "Vendor Version", tmp);
 #endif
 
 #if HAVE_NSLDAP
        SDKVersion = ldap_version( &ver );
        snprintf(tmp, 31, "%f", SDKVersion/100.0 );
-       tmp[31] = '\0';
        php_info_print_table_row(2, "SDK Version", tmp );
 
        snprintf(tmp, 31, "%f", ver.protocol_version/100.0 );
-       tmp[31] = '\0';
        php_info_print_table_row(2, "Highest LDAP Protocol Supported", tmp );
 
        snprintf(tmp, 31, "%f", ver.SSL_version/100.0 );
-       tmp[31] = '\0';
        php_info_print_table_row(2, "SSL Level Supported", tmp );
 
        if ( ver.security_level != LDAP_SECURITY_NONE ) {
                snprintf(tmp, 31, "%d", ver.security_level );
-               tmp[31] = '\0';
        } else {
                strcpy(tmp, "SSL not enabled" );
        }