com php-src: Style cleanup: ext/pdo_dblib/dblib_driver.c
[email protected] (Adam Baratz)
| Newsgroups | php.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: 3817cba7863f1cfa077baa3bb492c4eaf9f95bf3 Author: Adam Baratz <[email protected]> Mon, 20 Mar 2017 17:56:19 -0400 Parents: 7ba7a79039250842e6234c678fab408dec0191b9 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3817cba7863f1cfa077baa3bb492c4eaf9f95bf3 Log: Style cleanup Changed paths: M ext/pdo_dblib/dblib_driver.c Diff: diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c index 565b4b2..bb37ace 100644 --- a/ext/pdo_dblib/dblib_driver.c +++ b/ext/pdo_dblib/dblib_driver.c @@ -151,22 +151,21 @@ static zend_long dblib_handle_doer(pdo_dbh_t *dbh, const char *sql, size_t sql_l static int dblib_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, size_t unquotedlen, char **quoted, size_t *quotedlen, enum pdo_param_type paramtype) { - size_t i; char * q; *quotedlen = 0; /* Detect quoted length, adding extra char for doubled single quotes */ - for(i=0;i<unquotedlen;i++) { - if(unquoted[i] == '\'') ++*quotedlen; + for (i = 0; i < unquotedlen; i++) { + if (unquoted[i] == '\'') ++*quotedlen; ++*quotedlen; } *quotedlen += 2; /* +2 for opening, closing quotes */ - q = *quoted = emalloc(*quotedlen+1); /* Add byte for terminal null */ + q = *quoted = emalloc(*quotedlen + 1); /* Add byte for terminal null */ *q++ = '\''; - for (i=0;i<unquotedlen;i++) { + for (i = 0; i < unquotedlen; i++) { if (unquoted[i] == '\'') { *q++ = '\''; *q++ = '\'';