summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSitsofe Wheeler <sitsofe@yahoo.com>2020-08-19 21:57:05 +0100
committerSitsofe Wheeler <sitsofe@yahoo.com>2020-09-12 11:05:38 +0100
commit0cef322a943e6691277fe39472ef8bf488164717 (patch)
treea7ccde452c1e061a0617255d06504b8d4ac05d6b
parent0a7022820e85299364e29113e16d35f4350361f6 (diff)
downloadfio-0cef322a943e6691277fe39472ef8bf488164717.tar.gz
fio-0cef322a943e6691277fe39472ef8bf488164717.tar.bz2
net: coerce the result of htonl before printing
Technically htonl() returns a long on Windows (https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-htonl ) which upsets clang. Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
-rw-r--r--engines/net.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/net.c b/engines/net.c
index 91f25774..c6cec584 100644
--- a/engines/net.c
+++ b/engines/net.c
@@ -938,8 +938,9 @@ static int fio_netio_udp_recv_open(struct thread_data *td, struct fio_file *f)
if (ntohl(msg.magic) != FIO_LINK_OPEN_CLOSE_MAGIC ||
ntohl(msg.cmd) != FIO_LINK_OPEN) {
- log_err("fio: bad udp open magic %x/%x\n", ntohl(msg.magic),
- ntohl(msg.cmd));
+ log_err("fio: bad udp open magic %x/%x\n",
+ (unsigned int) ntohl(msg.magic),
+ (unsigned int) ntohl(msg.cmd));
return -1;
}