diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2019-07-06 01:49:50 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2019-07-06 01:49:50 +0200 |
commit | d42cd7795a44d5e5c32432eb536ef525bdb359a8 (patch) | |
tree | 27393ef27b1c250fbf1ac5e041e20549d3548a05 | |
parent | c64928e8e0211edf2ccfa628dfa41e5bd62ef8ae (diff) |
use arc4random() for coverity builds, yet another format specifier fix
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r-- | src/pkt.c | 4 | ||||
-rw-r--r-- | src/utils.c | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -218,8 +218,8 @@ void handle_packet(char *buf, unsigned bytes, int is_pcap, struct sockaddr_in *a if (pt_pkt->data_len != sizeof(challenge_t)) { pt_log(kLog_error, "Received challenge packet, but data length " "is not as expected.\n"); - pt_log(kLog_debug, "Data length: %d Expected: %d\n", - pt_pkt->data_len, sizeof (challenge_t)); + pt_log(kLog_debug, "Data length: %u Expected: %lu\n", + pt_pkt->data_len, sizeof(challenge_t)); cur->should_remove = 1; return; } diff --git a/src/utils.c b/src/utils.c index 8e340d4..64f6f88 100644 --- a/src/utils.c +++ b/src/utils.c @@ -157,7 +157,7 @@ void print_hexstr(unsigned char *buf, size_t siz) { #endif int pt_random(void) { -#ifdef HAVE_ARC4RANDOM +#if defined(HAVE_ARC4RANDOM) || defined(__COVERITY__) return arc4random(); #else #if defined(RNGDEV) && !defined(_WIN32) |