httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Clark <g...@dcs.ed.ac.uk>
Subject bug in ApacheRequest_parse macro
Date Wed, 09 Jul 2003 19:05:21 GMT

Hi,

There seems to be a minor bug in apache_request.h when a dereferenced
argument is supplied to this macro - how about the following simple
patch? (Hope I've checked the latest version!)

Graham

--- apache_request.h	2003-02-27 15:03:58.000000000 -0500
+++ apache_request.h-new	2003-07-09 14:53:08.000000000 -0500
@@ -97,7 +97,7 @@
 char *ApacheRequest_params_as_string(ApacheRequest *req, const char *key);
 int ApacheRequest___parse(ApacheRequest *req);
 #define ApacheRequest_parse(req) \
-    (req->status = req->parsed ? req->status : ApacheRequest___parse(req)) 
+    ((req)->status = (req)->parsed ? (req)->status : ApacheRequest___parse(req))

 table *ApacheRequest_query_params(ApacheRequest *req, ap_pool *p);
 table *ApacheRequest_post_params(ApacheRequest *req, ap_pool *p);
 



Mime
View raw message