httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chr...@apache.org
Subject svn commit: r492394 - /httpd/httpd/trunk/modules/database/mod_dbd.c
Date Thu, 04 Jan 2007 03:12:50 GMT
Author: chrisd
Date: Wed Jan  3 19:12:48 2007
New Revision: 492394

URL: http://svn.apache.org/viewvc?view=rev&rev=492394
Log:
Fix several strict compiler warnings for both the threaded
and non-threaded versions.

Modified:
    httpd/httpd/trunk/modules/database/mod_dbd.c

Modified: httpd/httpd/trunk/modules/database/mod_dbd.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/database/mod_dbd.c?view=diff&rev=492394&r1=492393&r2=492394
==============================================================================
--- httpd/httpd/trunk/modules/database/mod_dbd.c (original)
+++ httpd/httpd/trunk/modules/database/mod_dbd.c Wed Jan  3 19:12:48 2007
@@ -128,14 +128,18 @@
     return svr;
 }
 
-#define ISINT(val) \
-        for (p = val; *p; ++p)        \
-                if (!apr_isdigit(*p))        \
-                        return "Argument must be numeric!"
+#define ISINT(val) do {                                                 \
+        const char *p;                                                  \
+                                                                        \
+        for (p = val; *p; ++p) {                                        \
+            if (!apr_isdigit(*p)) {                                     \
+                return "Argument must be numeric!";                     \
+            }                                                           \
+        }                                                               \
+    } while (0)
 
 static const char *dbd_param(cmd_parms *cmd, void *dconf, const char *val)
 {
-    const char *p;
     const apr_dbd_driver_t *driver = NULL;
     svr_cfg *svr = ap_get_module_config(cmd->server->module_config,
                                         &dbd_module);
@@ -559,7 +563,7 @@
 
     if (!svr->persist) {
         /* Return a once-only connection */
-        dbd_construct((void**) &rec, svr, s->process->pool);
+        dbd_construct((void*) &rec, svr, s->process->pool);
         return rec;
     }
 
@@ -570,7 +574,7 @@
         }
     }
 
-    rv = apr_reslist_acquire(svr->reslist, (void**) &rec);
+    rv = apr_reslist_acquire(svr->reslist, (void*) &rec);
     if (rv != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
                      "Failed to acquire DBD connection from pool!");
@@ -595,7 +599,7 @@
 
     /* We don't have a connection right now, so we'll open one */
     if (!rec) {
-        dbd_construct((void**) &rec, svr, s->process->pool);
+        dbd_construct((void*) &rec, svr, s->process->pool);
         svr->rec = rec;
 
         if (rec) {



Mime
View raw message