diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2004-06-01 21:04:33 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2004-06-01 21:04:33 +0000 |
| commit | 6b35037ca28e3b314bf290c8427722c202d194e1 (patch) | |
| tree | 2a70e67a8bd484146f1f4928ac226beab7a790a1 /ext/ldap | |
| parent | 98a6986d97fd2d09fef2c4b870f6d77b5d29efe0 (diff) | |
| download | php-git-6b35037ca28e3b314bf290c8427722c202d194e1.tar.gz | |
No need to NULL terminate manually, snprintf() does it for us already.
Diffstat (limited to 'ext/ldap')
| -rw-r--r-- | ext/ldap/ldap.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index c8e62b74af..a2a2ff7c6d 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -310,12 +310,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 @@ -325,27 +323,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"); } |
