apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1128838 - in /apr/apr/trunk: crypto/apr_crypto_nss.c crypto/apr_crypto_openssl.c include/private/apr_crypto_internal.h
Date Sun, 29 May 2011 07:30:21 GMT
Author: sf
Date: Sun May 29 07:30:21 2011
New Revision: 1128838

URL: http://svn.apache.org/viewvc?rev=1128838&view=rev
Log:
Fix compilation with C90

Modified:
    apr/apr/trunk/crypto/apr_crypto_nss.c
    apr/apr/trunk/crypto/apr_crypto_openssl.c
    apr/apr/trunk/include/private/apr_crypto_internal.h

Modified: apr/apr/trunk/crypto/apr_crypto_nss.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/crypto/apr_crypto_nss.c?rev=1128838&r1=1128837&r2=1128838&view=diff
==============================================================================
--- apr/apr/trunk/crypto/apr_crypto_nss.c (original)
+++ apr/apr/trunk/crypto/apr_crypto_nss.c Sun May 29 07:30:21 2011
@@ -88,7 +88,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();
@@ -463,11 +463,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;
             }
@@ -527,6 +528,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;
@@ -539,7 +541,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) {
@@ -688,6 +690,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;
@@ -700,7 +703,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/trunk/crypto/apr_crypto_openssl.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/crypto/apr_crypto_openssl.c?rev=1128838&r1=1128837&r2=1128838&view=diff
==============================================================================
--- apr/apr/trunk/crypto/apr_crypto_openssl.c (original)
+++ apr/apr/trunk/crypto/apr_crypto_openssl.c Sun May 29 07:30:21 2011
@@ -80,7 +80,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/trunk/include/private/apr_crypto_internal.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/private/apr_crypto_internal.h?rev=1128838&r1=1128837&r2=1128838&view=diff
==============================================================================
--- apr/apr/trunk/include/private/apr_crypto_internal.h (original)
+++ apr/apr/trunk/include/private/apr_crypto_internal.h Sun May 29 07:30:21 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