Fossil SCM

Fix compiler warning and improve performance in previous check-in.

drh 2025-09-04 12:00 trunk
Commit 9d7c15d40919626ebbe21fed91101515f91efa936cab2e30c77c2c1a5e8a51b0
1 file changed +1 -1
+1 -1
--- src/cgi.c
+++ src/cgi.c
@@ -257,11 +257,11 @@
257257
** changed (by calling this routine) in the exceptional case where some
258258
** other content type is being returned.
259259
*/
260260
void cgi_set_content_type(const char *zType){
261261
int i;
262
- for(i=0; zType[i]=='+' || zType[i]>='-' && zType[i]<='z'; i++){}
262
+ for(i=0; zType[i]>='+' && zType[i]<='z'; i++){}
263263
zReplyMimeType = fossil_strndup(zType, i);
264264
}
265265
266266
/*
267267
** Erase any existing reply content. Replace is with a pNewContent.
268268
--- src/cgi.c
+++ src/cgi.c
@@ -257,11 +257,11 @@
257 ** changed (by calling this routine) in the exceptional case where some
258 ** other content type is being returned.
259 */
260 void cgi_set_content_type(const char *zType){
261 int i;
262 for(i=0; zType[i]=='+' || zType[i]>='-' && zType[i]<='z'; i++){}
263 zReplyMimeType = fossil_strndup(zType, i);
264 }
265
266 /*
267 ** Erase any existing reply content. Replace is with a pNewContent.
268
--- src/cgi.c
+++ src/cgi.c
@@ -257,11 +257,11 @@
257 ** changed (by calling this routine) in the exceptional case where some
258 ** other content type is being returned.
259 */
260 void cgi_set_content_type(const char *zType){
261 int i;
262 for(i=0; zType[i]>='+' && zType[i]<='z'; i++){}
263 zReplyMimeType = fossil_strndup(zType, i);
264 }
265
266 /*
267 ** Erase any existing reply content. Replace is with a pNewContent.
268

Keyboard Shortcuts

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