diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2020-01-21 12:05:23 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2020-01-21 12:05:23 +0900 |
commit | 4997139b3e83761c9af0246cec829305c3d7d13b (patch) | |
tree | bd342e45cd30ec109ce28f693556e5a21b530b9e /random/rndw32.c | |
parent | 5ebb2f0671c902863eee91cbcfc85a72be506410 (diff) | |
download | libgcrypt-4997139b3e83761c9af0246cec829305c3d7d13b.tar.gz |
Avoid use of ulong in internal code.
* configure.ac (HAVE_ULONG_TYPEDEF): Remove.
* mpi/mpi-div.c (_gcry_mpi_fdiv_r_ui): Use unsigned long.
(_gcry_mpi_divisible_ui): Likewise.
* random/rndunix.c (_gcry_rndunix_gather_random): Likewise.
* random/rndw32.c (_gcry_rndw32_gather_random_fast): Likewise.
(ADDINT): Likewise.
* random/rndw32ce.c (_gcry_rndw32ce_gather_random_fast): Likewise.
* src/mpi.h: Follow the change.
* src/types.h (HAVE_ULONG_TYPEDEF): Remove.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'random/rndw32.c')
-rw-r--r-- | random/rndw32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/random/rndw32.c b/random/rndw32.c index 08a8867d..b3f63d20 100644 --- a/random/rndw32.c +++ b/random/rndw32.c @@ -845,10 +845,10 @@ _gcry_rndw32_gather_random_fast (void (*add)(const void*, size_t, We discard the upper 32-bit of those values. */ { - byte buffer[20*sizeof(ulong)], *bufptr; + byte buffer[20*sizeof(unsigned long)], *bufptr; bufptr = buffer; -#define ADDINT(f) do { ulong along = (ulong)(f); \ +#define ADDINT(f) do { unsigned long along = (unsigned long)(f); \ memcpy (bufptr, &along, sizeof (along) ); \ bufptr += sizeof (along); \ } while (0) |