aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2019-07-06 01:51:13 +0200
committerToni Uhlig <matzeton@googlemail.com>2019-07-06 01:51:13 +0200
commit192c6470b7a37718cd8bc10e5f00d2fc3d576303 (patch)
tree973d1237ac01874092874e080feb0e14085adcd3
parent7977be8365673f7f47c1e45f0508f099b7b94246 (diff)
parentd42cd7795a44d5e5c32432eb536ef525bdb359a8 (diff)
Merge branch 'master' into coverity_scancoverity_scan
-rw-r--r--src/pkt.c4
-rw-r--r--src/utils.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/pkt.c b/src/pkt.c
index 473737e..bc87720 100644
--- a/src/pkt.c
+++ b/src/pkt.c
@@ -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)