Fossil SCM
Remove an unused variable from the URL encoder.
Commit
5210b9379aeed22827a14445809697df0446b411
Parent
a89560616fca1a0…
1 file changed
-2
-2
| --- src/encode.c | ||
| +++ src/encode.c | ||
| @@ -131,19 +131,17 @@ | ||
| 131 | 131 | static char *EncodeHttp(const char *zIn, int n, int encodeSlash){ |
| 132 | 132 | int c; |
| 133 | 133 | int i = 0; |
| 134 | 134 | int count = 0; |
| 135 | 135 | char *zOut; |
| 136 | - int other; | |
| 137 | 136 | # define IsSafeChar(X) \ |
| 138 | 137 | (fossil_isalnum(X) || (X)=='.' || (X)=='$' \ |
| 139 | 138 | || (X)=='~' || (X)=='-' || (X)=='_' \ |
| 140 | 139 | || (!encodeSlash && ((X)=='/' || (X)==':'))) |
| 141 | 140 | |
| 142 | 141 | if( zIn==0 ) return 0; |
| 143 | 142 | if( n<0 ) n = strlen(zIn); |
| 144 | - other = encodeSlash ? 'a' : '/'; | |
| 145 | 143 | while( i<n && (c = zIn[i])!=0 ){ |
| 146 | 144 | if( IsSafeChar(c) || c==' ' ){ |
| 147 | 145 | count++; |
| 148 | 146 | }else{ |
| 149 | 147 | count += 3; |
| 150 | 148 |
| --- 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 |