mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
+3
-1
@@ -56,7 +56,9 @@ prompt_input(const char *prompt, char *input, const size_t max_input_len,
|
||||
printf("\nEnter %s (%zu bytes) > ", prompt, max_input_len);
|
||||
}
|
||||
fflush(stdout);
|
||||
fgets(input_tmp, sizeof input_tmp, stdin);
|
||||
if (fgets(input_tmp, sizeof input_tmp, stdin) == NULL) {
|
||||
input_tmp[0] = '\0';
|
||||
}
|
||||
actual_input_len = strlen(input_tmp);
|
||||
|
||||
/* trim \n */
|
||||
|
||||
@@ -86,7 +86,9 @@ sodium_hrtime(void)
|
||||
#else
|
||||
{
|
||||
struct timeval tv;
|
||||
assert(gettimeofday(&tv, NULL) == 0);
|
||||
int ret = gettimeofday(&tv, NULL);
|
||||
(void)ret;
|
||||
assert(ret == 0);
|
||||
ts = ((uint64_t) tv.tv_sec) * 1000000U + (uint64_t) tv.tv_usec;
|
||||
}
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ static unsigned char a2[crypto_auth_hmacsha512_BYTES];
|
||||
int main(void)
|
||||
{
|
||||
crypto_auth_hmacsha512_state st;
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
assert(crypto_auth_hmacsha512_statebytes() ==
|
||||
sizeof(crypto_auth_hmacsha512_state));
|
||||
|
||||
Reference in New Issue
Block a user