apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1129333 - in /apr/apr-util/branches/1.4.x: crypto/apr_crypto_nss.c crypto/apr_crypto_openssl.c include/private/apr_crypto_internal.h
Date Mon, 30 May 2011 19:56:44 GMT
Author: minfrin
Date: Mon May 30 19:56:43 2011
New Revision: 1129333

URL: http://svn.apache.org/viewvc?rev=1129333&view=rev
Log:
Backport from trunk: Fix compilation with C90.

Modified:
    apr/apr-util/branches/1.4.x/crypto/apr_crypto_nss.c
    apr/apr-util/branches/1.4.x/crypto/apr_crypto_openssl.c
    apr/apr-util/branches/1.4.x/include/private/apr_crypto_internal.h

Modified: apr/apr-util/branches/1.4.x/crypto/apr_crypto_nss.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.4.x/crypto/apr_crypto_nss.c?rev=1129333&r1=1129332&r2=1129333&view=diff
==============================================================================
--- apr/apr-util/branches/1.4.x/crypto/apr_crypto_nss.c (original)
+++ apr/apr-util/branches/1.4.x/crypto/apr_crypto_nss.c Mon May 30 19:56:43 2011
@@ -87,7 +87,7 @@ static apr_status_t crypto_error(const a
  *
  * It is safe to shut down twice.
  */
-static apr_status_t crypto_shutdown()
+static apr_status_t crypto_shutdown(void)
 {
     if (NSS_IsInitialized()) {
         SECStatus s = NSS_Shutdown();
@@ -462,11 +462,12 @@ static apr_status_t crypto_block_encrypt
             return APR_ENOIV;
         }
         if (*iv == NULL) {
+            SECStatus s;
             usedIv = apr_pcalloc(p, key->ivSize);
             if (!usedIv) {
                 return APR_ENOMEM;
             }
-            SECStatus s = PK11_GenerateRandom(usedIv, key->ivSize);
+            s = PK11_GenerateRandom(usedIv, key->ivSize);
             if (s != SECSuccess) {
                 return APR_ENOIV;
             }
@@ -526,6 +527,7 @@ static apr_status_t crypto_block_encrypt
 
     unsigned char *buffer;
     int outl = (int) *outlen;
+    SECStatus s;
     if (!out) {
         *outlen = inlen + block->blockSize;
         return APR_SUCCESS;
@@ -538,7 +540,7 @@ static apr_status_t crypto_block_encrypt
         *out = buffer;
     }
 
-    SECStatus s = PK11_CipherOp(block->ctx, *out, &outl, inlen, (unsigned char*)in,
inlen);
+    s = PK11_CipherOp(block->ctx, *out, &outl, inlen, (unsigned char*)in, inlen);
     if (s != SECSuccess) {
         PRErrorCode perr = PORT_GetError();
         if (perr) {
@@ -687,6 +689,7 @@ static apr_status_t crypto_block_decrypt
 
     unsigned char *buffer;
     int outl = (int) *outlen;
+    SECStatus s;
     if (!out) {
         *outlen = inlen + block->blockSize;
         return APR_SUCCESS;
@@ -699,7 +702,7 @@ static apr_status_t crypto_block_decrypt
         *out = buffer;
     }
 
-    SECStatus s = PK11_CipherOp(block->ctx, *out, &outl, inlen, (unsigned char*)in,
inlen);
+    s = PK11_CipherOp(block->ctx, *out, &outl, inlen, (unsigned char*)in, inlen);
     if (s != SECSuccess) {
         PRErrorCode perr = PORT_GetError();
         if (perr) {

Modified: apr/apr-util/branches/1.4.x/crypto/apr_crypto_openssl.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.4.x/crypto/apr_crypto_openssl.c?rev=1129333&r1=1129332&r2=1129333&view=diff
==============================================================================
--- apr/apr-util/branches/1.4.x/crypto/apr_crypto_openssl.c (original)
+++ apr/apr-util/branches/1.4.x/crypto/apr_crypto_openssl.c Mon May 30 19:56:43 2011
@@ -79,7 +79,7 @@ static apr_status_t crypto_error(const a
 /**
  * Shutdown the crypto library and release resources.
  */
-static apr_status_t crypto_shutdown() {
+static apr_status_t crypto_shutdown(void) {
     ERR_free_strings();
     EVP_cleanup();
     ENGINE_cleanup();

Modified: apr/apr-util/branches/1.4.x/include/private/apr_crypto_internal.h
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.4.x/include/private/apr_crypto_internal.h?rev=1129333&r1=1129332&r2=1129333&view=diff
==============================================================================
--- apr/apr-util/branches/1.4.x/include/private/apr_crypto_internal.h (original)
+++ apr/apr-util/branches/1.4.x/include/private/apr_crypto_internal.h Mon May 30 19:56:43
2011
@@ -234,7 +234,7 @@ struct apr_crypto_driver_t {
      * @note After cleanup, a context is free to be reused if necessary.
      * @return Returns APR_ENOTIMPL if not supported.
      */
-    apr_status_t (*shutdown)();
+    apr_status_t (*shutdown)(void);
 
     /**
      * @brief: fetch the most recent error from this driver.



Mime
View raw message