From: Fabian Keil Date: Sun, 22 May 2011 10:25:26 +0000 (+0000) Subject: If only one of the strncmpic() arguments has a length the compiler can figure out... X-Git-Tag: v_3_0_18~228 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=5e4a876763811af984c9cafca6f4a0a6610eccb9 If only one of the strncmpic() arguments has a length the compiler can figure out, move it to the second place This will allow to use a macro to figure out the length later on. --- diff --git a/filters.c b/filters.c index 17918e94..2a1f46b2 100644 --- a/filters.c +++ b/filters.c @@ -1,4 +1,4 @@ -const char filters_rcs[] = "$Id: filters.c,v 1.141 2011/03/08 18:32:11 fabiankeil Exp $"; +const char filters_rcs[] = "$Id: filters.c,v 1.142 2011/04/19 13:00:47 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/filters.c,v $ @@ -2231,7 +2231,7 @@ struct http_response *direct_response(struct client_state *csp) { for (p = csp->headers->first; (p != NULL) ; p = p->next) { - if (!strncmpic("Max-Forwards:", p->str, 13)) + if (!strncmpic(p->str, "Max-Forwards:", 13)) { unsigned int max_forwards; diff --git a/urlmatch.c b/urlmatch.c index 9431e46a..ebaf63c1 100644 --- a/urlmatch.c +++ b/urlmatch.c @@ -1,4 +1,4 @@ -const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.59 2009/06/10 13:17:17 fabiankeil Exp $"; +const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.60 2011/04/19 13:00:47 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/urlmatch.c,v $ @@ -1128,7 +1128,7 @@ jb_err create_url_spec(struct url_spec *url, char *buf) } /* Is it a tag pattern? */ - if (0 == strncmpic("TAG:", url->spec, 4)) + if (0 == strncmpic(url->spec, "TAG:", 4)) { /* The pattern starts with the first character after "TAG:" */ const char *tag_pattern = buf + 4;