diff options
author | Adam Baratz <adambaratz@php.net> | 2017-03-20 17:56:19 -0400 |
---|---|---|
committer | Adam Baratz <adambaratz@php.net> | 2017-03-20 17:56:19 -0400 |
commit | 3817cba7863f1cfa077baa3bb492c4eaf9f95bf3 (patch) | |
tree | 6b8993fb6f825afda192df8e0c6b85bfe595defb /ext/pdo_dblib | |
parent | 7ba7a79039250842e6234c678fab408dec0191b9 (diff) | |
download | php-git-3817cba7863f1cfa077baa3bb492c4eaf9f95bf3.tar.gz |
Style cleanup
Diffstat (limited to 'ext/pdo_dblib')
-rw-r--r-- | ext/pdo_dblib/dblib_driver.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c index 565b4b2ca8..bb37ace47a 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++ = '\''; |