提交 cea0b4ce 编写于 作者: C Christoph Hellwig 提交者: Nicholas Bellinger

iscsit: add missing endianess conversion in iscsit_check_inaddr_any

Sparse noticed that INADDR_ANY needs to be converted to big endian before
it can be stored in struct sockaddr_in.s_addr.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 904753da
......@@ -3239,7 +3239,7 @@ static bool iscsit_check_inaddr_any(struct iscsi_np *np)
struct sockaddr_in * sock_in =
(struct sockaddr_in *)&np->np_sockaddr;
if (sock_in->sin_addr.s_addr == INADDR_ANY)
if (sock_in->sin_addr.s_addr == htonl(INADDR_ANY))
ret = true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册