Skip to content

Commit

Permalink
fix type error on i686 - uint64_t
Browse files Browse the repository at this point in the history
It is probably better to use the uint64_t type which is really used in the code for the respective generators
  • Loading branch information
xambroz authored May 16, 2024
1 parent bfc1d32 commit ad86d55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/prng.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ int nwipe_add_lagg_fibonacci_prng_init( NWIPE_PRNG_INIT_SIGNATURE )
*state = malloc( sizeof( add_lagg_fibonacci_state_t ) );
}
add_lagg_fibonacci_init(
(add_lagg_fibonacci_state_t*) *state, (long unsigned int*) ( seed->s ), seed->length / sizeof( long unsigned int ) );
(add_lagg_fibonacci_state_t*) *state, (uint64_t*) ( seed->s ), seed->length / sizeof( uint64_t ) );

return 0;
}
Expand All @@ -285,7 +285,7 @@ int nwipe_xoroshiro256_prng_init( NWIPE_PRNG_INIT_SIGNATURE )
*state = malloc( sizeof( xoroshiro256_state_t ) );
}
xoroshiro256_init(
(xoroshiro256_state_t*) *state, (long unsigned int*) ( seed->s ), seed->length / sizeof( long unsigned int ) );
(xoroshiro256_state_t*) *state, (uint64_t*) ( seed->s ), seed->length / sizeof( uint64_t ) );

return 0;
}
Expand Down

0 comments on commit ad86d55

Please sign in to comment.