Re: svn commit: r1874545 - /httpd/httpd/trunk/modules/filters/mod_brotli.c

2020-02-26 Thread Giovanni Bechis
On Wed, Feb 26, 2020 at 10:39:02PM +0100, Marion & Christophe JAILLET wrote:
> 
> Le 26/02/2020 à 18:47, gbec...@apache.org a écrit :
> > Author: gbechis
> > Date: Wed Feb 26 17:47:53 2020
> > New Revision: 1874545
> >
> > URL: http://svn.apache.org/viewvc?rev=1874545=rev
> > Log:
> > Avoid printing NULL strings in logs
> >
> > Modified:
> >  httpd/httpd/trunk/modules/filters/mod_brotli.c
> >
> > Modified: httpd/httpd/trunk/modules/filters/mod_brotli.c
> > URL: 
> > http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_brotli.c?rev=1874545=1874544=1874545=diff
> > ==
> > --- httpd/httpd/trunk/modules/filters/mod_brotli.c (original)
> > +++ httpd/httpd/trunk/modules/filters/mod_brotli.c Wed Feb 26 17:47:53 2020
> > @@ -419,7 +419,7 @@ static apr_status_t compress_filter(ap_f
> >   }
> >   q = ap_get_token(r->pool, , 1);
> >   ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
> > -  "token: '%s' - q: '%s'", token, q);
> > +  "token: '%s' - q: '%s'", token ?: "NULL", q);
> 
> Is this syntax standard? This looks like a GNU extension.
> 
> Shouldn't we use
>     token ? token : "NULL"
> instead?
> 
> A few google search make me think that it could be an issue with VS 
> (i.e. windows build)
> 
> Just my 2c.
> 
> CJ
> 
you are right, committed thanks.
 Giovanni


signature.asc
Description: PGP signature


Re: svn commit: r1874545 - /httpd/httpd/trunk/modules/filters/mod_brotli.c

2020-02-26 Thread Marion & Christophe JAILLET



Le 26/02/2020 à 18:47, gbec...@apache.org a écrit :

Author: gbechis
Date: Wed Feb 26 17:47:53 2020
New Revision: 1874545

URL: http://svn.apache.org/viewvc?rev=1874545=rev
Log:
Avoid printing NULL strings in logs

Modified:
 httpd/httpd/trunk/modules/filters/mod_brotli.c

Modified: httpd/httpd/trunk/modules/filters/mod_brotli.c
URL: 
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_brotli.c?rev=1874545=1874544=1874545=diff
==
--- httpd/httpd/trunk/modules/filters/mod_brotli.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_brotli.c Wed Feb 26 17:47:53 2020
@@ -419,7 +419,7 @@ static apr_status_t compress_filter(ap_f
  }
  q = ap_get_token(r->pool, , 1);
  ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
-  "token: '%s' - q: '%s'", token, q);
+  "token: '%s' - q: '%s'", token ?: "NULL", q);


Is this syntax standard? This looks like a GNU extension.

Shouldn't we use
   token ? token : "NULL"
instead?

A few google search make me think that it could be an issue with VS 
(i.e. windows build)


Just my 2c.

CJ



  }
  
  /* No acceptable token found or q=0 */