bjori Thu Oct 5 16:02:30 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/pgsql pgsql.c
Log:
- nuke unused variable
- "prefer" two arguments
- only print "wrong parameter count" once
http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.331.2.13.2.7&r2=1.331.2.13.2.8&diff_format=u
Index: php-src/ext/pgsql/pgsql.c
diff -u php-src/ext/pgsql/pgsql.c:1.331.2.13.2.7
php-src/ext/pgsql/pgsql.c:1.331.2.13.2.8
--- php-src/ext/pgsql/pgsql.c:1.331.2.13.2.7 Wed Oct 4 23:27:03 2006
+++ php-src/ext/pgsql/pgsql.c Thu Oct 5 16:02:29 2006
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql.c,v 1.331.2.13.2.7 2006/10/04 23:27:03 iliaa Exp $ */
+/* $Id: pgsql.c,v 1.331.2.13.2.8 2006/10/05 16:02:29 bjori Exp $ */
#include <stdlib.h>
@@ -3553,18 +3553,18 @@
{
char *from = NULL, *to = NULL;
zval *pgsql_link;
+#ifdef HAVE_PQESCAPE_CONN
PGconn *pgsql;
+#endif
int to_len;
int from_len;
- int id;
+ int id = -1;
- if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS()
TSRMLS_CC, "rs", &pgsql_link, &from, &from_len) == SUCCESS) {
- id = -1;
- } else if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &from,
&from_len) == SUCCESS) {
+ if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS()
TSRMLS_CC, "s", &from, &from_len) == SUCCESS) {
pgsql_link = NULL;
id = PGG(default_link);
- } else {
- WRONG_PARAM_COUNT;
+ } else if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs",
&pgsql_link, &from, &from_len) == FAILURE) {
+ return;
}
to = (char *) safe_emalloc(from_len, 2, 1);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php