From f8b1a6c562b4ef040d130586adc2fad6d23ab6e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 19 Feb 2014 20:53:54 +0100 Subject: [PATCH] qrexec: use proper unsigned type instead of muting compiler warning --- qrexec/qrexec-agent.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qrexec/qrexec-agent.c b/qrexec/qrexec-agent.c index 7ca91e1..f4b278f 100644 --- a/qrexec/qrexec-agent.c +++ b/qrexec/qrexec-agent.c @@ -382,10 +382,10 @@ void handle_process_data(int fd) struct server_header s_hdr; char buf[MAX_DATA_CHUNK]; int ret; - int len; + unsigned int len; len = buffer_space_vchan_ext(); - if (len <= (int)sizeof s_hdr) + if (len <= sizeof s_hdr) return; ret = read(fd, buf, len - sizeof s_hdr); @@ -580,7 +580,7 @@ int main() reap_children(); max = fill_fds_for_select(&rdset, &wrset); if (buffer_space_vchan_ext() <= - (int)sizeof(struct server_header)) + sizeof(struct server_header)) FD_ZERO(&rdset); wait_for_vchan_or_argfd(max, &rdset, &wrset);