summaryrefslogtreecommitdiff
path: root/ext/sqlite/sqlite.c
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2003-04-27 13:32:43 +0000
committerWez Furlong <wez@php.net>2003-04-27 13:32:43 +0000
commit23c4c206a4132393ae24d02f0863a273b5119f92 (patch)
tree6e7f5844884ce22e9bd8eb67a65fa3cd37d7c3e9 /ext/sqlite/sqlite.c
parentfe94e0394e74335c211be1aca27b980e5cb2ad84 (diff)
downloadphp-git-23c4c206a4132393ae24d02f0863a273b5119f92.tar.gz
WS, plus default: would prevent case SQLITE_DONE: in php_sqlite_fetch().
Diffstat (limited to 'ext/sqlite/sqlite.c')
-rw-r--r--ext/sqlite/sqlite.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c
index 311cc7001a..6bc776a9cc 100644
--- a/ext/sqlite/sqlite.c
+++ b/ext/sqlite/sqlite.c
@@ -48,18 +48,18 @@ static int le_sqlite_db, le_sqlite_result, le_sqlite_pdb;
static inline void php_sqlite_strtoupper(char *s)
{
- while (*s!='\0') {
- *s = toupper(*s);
- s++;
- }
+ while (*s!='\0') {
+ *s = toupper(*s);
+ s++;
+ }
}
static inline void php_sqlite_strtolower(char *s)
{
- while (*s!='\0') {
- *s = tolower(*s);
- s++;
- }
+ while (*s!='\0') {
+ *s = tolower(*s);
+ s++;
+ }
}
/* {{{ PHP_INI
@@ -804,7 +804,7 @@ PHP_FUNCTION(sqlite_close)
}
/* }}} */
-/* {{{ */
+/* {{{ php_sqlite_fetch */
int php_sqlite_fetch(struct php_sqlite_result *rres TSRMLS_DC)
{
const char **rowdata, **colnames;
@@ -863,13 +863,6 @@ next_row:
ret = SQLITE_OK;
break;
- case SQLITE_BUSY:
- case SQLITE_ERROR:
- case SQLITE_MISUSE:
- default:
- /* fall through to finalize */
- ;
-
case SQLITE_DONE:
if (rres->vm) {
ret = sqlite_finalize(rres->vm, &errtext);
@@ -880,6 +873,14 @@ next_row:
sqlite_freemem(errtext);
}
break;
+
+ case SQLITE_BUSY:
+ case SQLITE_ERROR:
+ case SQLITE_MISUSE:
+ default:
+ /* fall through to finalize */
+ ;
+
}
return ret;
}