summaryrefslogtreecommitdiff
path: root/ext/interbase
diff options
context:
space:
mode:
authorColin Viebrock <cmv@php.net>2000-04-06 17:01:41 +0000
committerColin Viebrock <cmv@php.net>2000-04-06 17:01:41 +0000
commit2cb6745cf001ec9e4fe8df78c74b994df2e80e73 (patch)
treeb4d26aee478244328cd081aff7bd4a422d3dea93 /ext/interbase
parent5115342c6ed0aab1d86a3b9ba36d0144580692d6 (diff)
downloadphp-git-2cb6745cf001ec9e4fe8df78c74b994df2e80e73.tar.gz
a better way, i've been told (thanks)
Diffstat (limited to 'ext/interbase')
-rw-r--r--ext/interbase/interbase.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c
index 0afca99a96..3d06f41ed1 100644
--- a/ext/interbase/interbase.c
+++ b/ext/interbase/interbase.c
@@ -513,7 +513,6 @@ PHP_MINFO_FUNCTION(ibase)
{
char tmp[128];
- char tmp2[128];
IBLS_FETCH();
@@ -525,21 +524,17 @@ PHP_MINFO_FUNCTION(ibase)
#endif
php_info_print_table_row(2, "Allow Persistent Links", (IBG(allow_persistent)?"Yes":"No") );
- sprintf(tmp, "%d/", IBG(num_persistent) );
if (IBG(max_persistent) == -1) {
- strcat(tmp, "unlimited");
+ snprintf(tmp, 128, "%d/unlimited", IBG(num_persistent));
} else {
- sprintf(tmp2, "%ld", IBG(max_persistent));
- strcat(tmp, tmp2);
+ snprintf(tmp, 128, "%d/%ld", IBG(num_persistent), IBG(max_persistent));
}
php_info_print_table_row(2, "Persistent Links", tmp );
- sprintf(tmp, "%d/", IBG(num_links) );
if (IBG(max_links) == -1) {
- strcat(tmp, "unlimited");
+ snprintf(tmp, 128, "%d/unlimited", IBG(num_links));
} else {
- sprintf(tmp2, "%ld", IBG(max_links));
- strcat(tmp, tmp2);
+ snprintf(tmp, 128, "%d/%ld", IBG(num_links), IBG(max_links));
}
php_info_print_table_row(2, "Total Links", tmp );