diff options
author | Gilad Arnold <garnold@google.com> | 2015-08-25 23:30:15 -0700 |
---|---|---|
committer | Gilad Arnold <garnold@google.com> | 2015-08-26 06:07:08 -0700 |
commit | 49bc10aa7e889c3c52c1f62c1a61d3e439670461 (patch) | |
tree | 73b1df3ec4acd665f3d0d14ec996a6c22faf289b | |
parent | b03c2540a04feb5d638051f044766a543250bc28 (diff) | |
download | tlsdate-49bc10aa7e889c3c52c1f62c1a61d3e439670461.tar.gz |
Fix another signed/unsigned comparison.
This one happens inside a netlink macro, despite the code seems to abide
by the "declared" types. Regardless, now fixed.
Bug: 22373707
Change-Id: Ib6ca5bd0abe3f7304dd56dad7c57e871d7f56007
-rw-r--r-- | src/routeup.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/routeup.c b/src/routeup.c index a5925d5..f2accdc 100644 --- a/src/routeup.c +++ b/src/routeup.c @@ -73,10 +73,12 @@ int API routeup_process (struct routeup *rtc) { char buf[4096]; - ssize_t sz; + ssize_t ret; + size_t sz; struct nlmsghdr *nh; - if ( (sz = read (rtc->netlinkfd, buf, sizeof (buf))) < 0) + if ( (ret = read (rtc->netlinkfd, buf, sizeof (buf))) < 0) return -1; + sz = (size_t) ret; for (nh = (struct nlmsghdr *) buf; NLMSG_OK (nh, sz); nh = NLMSG_NEXT (nh, sz)) { |