Fossil SCM

Remove an unused variable from the URL encoder.

drh 2013-01-18 02:23 trunk
Commit 5210b9379aeed22827a14445809697df0446b411
1 file changed -2
--- src/encode.c
+++ src/encode.c
@@ -131,19 +131,17 @@
131131
static char *EncodeHttp(const char *zIn, int n, int encodeSlash){
132132
int c;
133133
int i = 0;
134134
int count = 0;
135135
char *zOut;
136
- int other;
137136
# define IsSafeChar(X) \
138137
(fossil_isalnum(X) || (X)=='.' || (X)=='$' \
139138
|| (X)=='~' || (X)=='-' || (X)=='_' \
140139
|| (!encodeSlash && ((X)=='/' || (X)==':')))
141140
142141
if( zIn==0 ) return 0;
143142
if( n<0 ) n = strlen(zIn);
144
- other = encodeSlash ? 'a' : '/';
145143
while( i<n && (c = zIn[i])!=0 ){
146144
if( IsSafeChar(c) || c==' ' ){
147145
count++;
148146
}else{
149147
count += 3;
150148
--- src/encode.c
+++ src/encode.c
@@ -131,19 +131,17 @@
131 static char *EncodeHttp(const char *zIn, int n, int encodeSlash){
132 int c;
133 int i = 0;
134 int count = 0;
135 char *zOut;
136 int other;
137 # define IsSafeChar(X) \
138 (fossil_isalnum(X) || (X)=='.' || (X)=='$' \
139 || (X)=='~' || (X)=='-' || (X)=='_' \
140 || (!encodeSlash && ((X)=='/' || (X)==':')))
141
142 if( zIn==0 ) return 0;
143 if( n<0 ) n = strlen(zIn);
144 other = encodeSlash ? 'a' : '/';
145 while( i<n && (c = zIn[i])!=0 ){
146 if( IsSafeChar(c) || c==' ' ){
147 count++;
148 }else{
149 count += 3;
150
--- src/encode.c
+++ src/encode.c
@@ -131,19 +131,17 @@
131 static char *EncodeHttp(const char *zIn, int n, int encodeSlash){
132 int c;
133 int i = 0;
134 int count = 0;
135 char *zOut;
 
136 # define IsSafeChar(X) \
137 (fossil_isalnum(X) || (X)=='.' || (X)=='$' \
138 || (X)=='~' || (X)=='-' || (X)=='_' \
139 || (!encodeSlash && ((X)=='/' || (X)==':')))
140
141 if( zIn==0 ) return 0;
142 if( n<0 ) n = strlen(zIn);
 
143 while( i<n && (c = zIn[i])!=0 ){
144 if( IsSafeChar(c) || c==' ' ){
145 count++;
146 }else{
147 count += 3;
148

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button