diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2020-11-02 03:26:09 +0100 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2020-11-02 03:26:09 +0100 |
commit | 21d8927f794bd901b13feaaac6d31d463349a64f (patch) | |
tree | 382204a5466740b275d207148ccae27e9779bbe1 /g10 | |
parent | gpg: Fix counting buffer size in check_signature2. (diff) | |
download | gnupg2-21d8927f794bd901b13feaaac6d31d463349a64f.tar.xz gnupg2-21d8927f794bd901b13feaaac6d31d463349a64f.zip |
gpg: Change the API for checksum to use const qualifier.
* g10/main.h (checksum): Use const.
* g10/misc.c (checksum): Use const.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'g10')
-rw-r--r-- | g10/main.h | 2 | ||||
-rw-r--r-- | g10/misc.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/g10/main.h b/g10/main.h index 7f3752aac..06cbfc8d8 100644 --- a/g10/main.h +++ b/g10/main.h @@ -110,7 +110,7 @@ void unregister_secured_file (const char *fname); int is_secured_file (int fd); int is_secured_filename (const char *fname); u16 checksum_u16( unsigned n ); -u16 checksum( byte *p, unsigned n ); +u16 checksum( const byte *p, unsigned n ); u16 checksum_mpi( gcry_mpi_t a ); u32 buffer_to_u32( const byte *buffer ); const byte *get_session_marker( size_t *rlen ); diff --git a/g10/misc.c b/g10/misc.c index 0d457365b..67a2f1928 100644 --- a/g10/misc.c +++ b/g10/misc.c @@ -241,7 +241,7 @@ checksum_u16( unsigned n ) u16 -checksum( byte *p, unsigned n ) +checksum (const byte *p, unsigned n) { u16 a; |