]> Savannah Git Hosting - gnulib.git/commitdiff
crypto/*-buffer: Use 'restrict'.
authorBruno Haible <bruno@clisp.org>
Sun, 23 Feb 2020 12:22:42 +0000 (13:22 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 23 Feb 2020 12:22:42 +0000 (13:22 +0100)
* lib/gl_openssl.h (GL_CRYPTO_FN (_finish_ctx), GL_CRYPTO_FN (_buffer),
GL_CRYPTO_FN (_read_ctx)): Use 'restrict'.

ChangeLog
lib/gl_openssl.h

index 8701bead110846ae94a1f05782ea08eddb9ab22f..768083ebc82c79d62d602ea6b6e10f53a7c2f33f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2020-02-23  Bruno Haible  <bruno@clisp.org>
 
+       crypto/*-buffer: Use 'restrict'.
+       * lib/gl_openssl.h (GL_CRYPTO_FN (_finish_ctx), GL_CRYPTO_FN (_buffer),
+       GL_CRYPTO_FN (_read_ctx)): Use 'restrict'.
+
        crypto/sha512-buffer: Use 'restrict'.
        * lib/sha512.h (sha512_finish_ctx, sha384_finish_ctx, sha512_read_ctx,
        sha384_read_ctx, sha512_buffer, sha384_buffer): Use 'restrict'.
index e5991d82fa3334bc2d1aba14f66a82a4f0c65fc2..e985b1c6b12b606f37f4020aee7263a22bb768fb 100644 (file)
@@ -90,15 +90,15 @@ GL_CRYPTO_FN (_process_block) (const void *buf, size_t len, struct _gl_ctx *ctx)
 #endif
 
 GL_OPENSSL_INLINE void *
-GL_CRYPTO_FN (_finish_ctx) (struct _gl_ctx *ctx, void *res)
+GL_CRYPTO_FN (_finish_ctx) (struct _gl_ctx *ctx, void *restrict res)
 { OPENSSL_FN (_Final) ((unsigned char *) res, (_gl_CTX *) ctx); return res; }
 
 GL_OPENSSL_INLINE void *
-GL_CRYPTO_FN (_buffer) (const char *buf, size_t len, void *res)
+GL_CRYPTO_FN (_buffer) (const char *buf, size_t len, void *restrict res)
 { return OPENSSL_FN () ((const unsigned char *) buf, len, (unsigned char *) res); }
 
 GL_OPENSSL_INLINE void *
-GL_CRYPTO_FN (_read_ctx) (const struct _gl_ctx *ctx, void *res)
+GL_CRYPTO_FN (_read_ctx) (const struct _gl_ctx *ctx, void *restrict res)
 {
   /* Assume any unprocessed bytes in ctx are not to be ignored.  */
   _gl_CTX tmp_ctx = *(_gl_CTX *) ctx;