From 062626d03e0d5cd78273c7f0fa65f405790df63c Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Mon, 10 Oct 2005 20:06:35 +0000 Subject: [PATCH] use proper macros and vars instead of strlen() --- ext/mysqli/mysqli_api.c | 2 +- ext/mysqli/mysqli_nonapi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 453fb023c43..f4b35014a61 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -571,7 +571,7 @@ PHP_FUNCTION(mysqli_stmt_execute) case MYSQL_TYPE_VAR_STRING: convert_to_string_ex(&stmt->param.vars[i]); stmt->stmt->params[i].buffer = Z_STRVAL_PP(&stmt->param.vars[i]); - stmt->stmt->params[i].buffer_length = strlen(Z_STRVAL_PP(&stmt->param.vars[i])); + stmt->stmt->params[i].buffer_length = Z_STRLEN_PP(&stmt->param.vars[i]); break; case MYSQL_TYPE_DOUBLE: convert_to_double_ex(&stmt->param.vars[i]); diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index bef10913a7a..b3346cc861b 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -75,7 +75,7 @@ PHP_FUNCTION(mysqli_connect) } #ifdef HAVE_EMBEDDED_MYSQLI - if (hostname && strlen(hostname)) { + if (hostname_len && hostname) { unsigned int external=1; mysql_options(mysql->mysql, MYSQL_OPT_USE_REMOTE_CONNECTION, (char *)&external); } else {