aboutsummaryrefslogtreecommitdiff
path: root/src/printf.c
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2006-01-24 12:09:17 +0000
committerdanielk1977 <danielk1977@noemail.net>2006-01-24 12:09:17 +0000
commitf0113000000e3c41c7004a707a974e63c503a6a1 (patch)
tree63f696c660c82f42859f6c85a7506a98bcb39586 /src/printf.c
parent7246f5b9cb7c45b79d23969474b21ee1518d756a (diff)
downloadsqlite-f0113000000e3c41c7004a707a974e63c503a6a1.tar.gz
sqlite-f0113000000e3c41c7004a707a974e63c503a6a1.zip
Rename some variables to avoid hiding others. Also add "static" to two function signatures that were missing it. (CVS 3024)
FossilOrigin-Name: d86f18a4277ebffb644ba2e574e0b697c8bbf8e4
Diffstat (limited to 'src/printf.c')
-rw-r--r--src/printf.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/printf.c b/src/printf.c
index 8f1b2ac4b..261a55414 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -596,13 +596,13 @@ static int vxprintf(
break;
case etSQLESCAPE:
case etSQLESCAPE2: {
- int i, j, n, c, isnull;
+ int i, j, n, ch, isnull;
int needQuote;
- char *arg = va_arg(ap,char*);
- isnull = arg==0;
- if( isnull ) arg = (xtype==etSQLESCAPE2 ? "NULL" : "(NULL)");
- for(i=n=0; (c=arg[i])!=0; i++){
- if( c=='\'' ) n++;
+ char *escarg = va_arg(ap,char*);
+ isnull = escarg==0;
+ if( isnull ) escarg = (xtype==etSQLESCAPE2 ? "NULL" : "(NULL)");
+ for(i=n=0; (ch=escarg[i])!=0; i++){
+ if( ch=='\'' ) n++;
}
needQuote = !isnull && xtype==etSQLESCAPE2;
n += i + 1 + needQuote*2;
@@ -614,9 +614,9 @@ static int vxprintf(
}
j = 0;
if( needQuote ) bufpt[j++] = '\'';
- for(i=0; (c=arg[i])!=0; i++){
- bufpt[j++] = c;
- if( c=='\'' ) bufpt[j++] = c;
+ for(i=0; (ch=escarg[i])!=0; i++){
+ bufpt[j++] = ch;
+ if( ch=='\'' ) bufpt[j++] = ch;
}
if( needQuote ) bufpt[j++] = '\'';
bufpt[j] = 0;