apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1308131 - /apr/apr/trunk/crypto/apr_crypto.c
Date Sun, 01 Apr 2012 15:16:55 GMT
Author: minfrin
Date: Sun Apr  1 15:16:54 2012
New Revision: 1308131

URL: http://svn.apache.org/viewvc?rev=1308131&view=rev
Log:
apr_crypto: Ensure the *driver variable is initialised when a statically
compiled library is initialised for the first time.

Modified:
    apr/apr/trunk/crypto/apr_crypto.c

Modified: apr/apr/trunk/crypto/apr_crypto.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/crypto/apr_crypto.c?rev=1308131&r1=1308130&r2=1308131&view=diff
==============================================================================
--- apr/apr/trunk/crypto/apr_crypto.c (original)
+++ apr/apr/trunk/crypto/apr_crypto.c Sun Apr  1 15:16:54 2012
@@ -62,13 +62,14 @@ typedef struct apr_crypto_clear_t {
 } apr_crypto_clear_t;
 
 #if !APR_HAVE_MODULAR_DSO
-#define DRIVER_LOAD(name,driver,pool,params,rv,result) \
+#define DRIVER_LOAD(name,driver_name,pool,params,rv,result) \
     {   \
-        extern const apr_crypto_driver_t driver; \
-        apr_hash_set(drivers,name,APR_HASH_KEY_STRING,&driver); \
-        if (driver.init) {     \
-            rv = driver.init(pool, params, result); \
+        extern const apr_crypto_driver_t driver_name; \
+        apr_hash_set(drivers,name,APR_HASH_KEY_STRING,&driver_name); \
+        if (driver_name.init) {     \
+            rv = driver_name.init(pool, params, result); \
         }  \
+        *driver = &driver_name; \
     }
 #endif
 



Mime
View raw message