From aa91fdc4bf0272ba0a8e376dfd496de6043e8d59 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 29 Apr 2014 21:11:14 +1000 Subject: [PATCH] silence compiler warnings; style (cherry picked from commit db3f8d175d42f6ad20bab3a7a567f5115461efc4) --- bin/tests/dst/t_dst.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/tests/dst/t_dst.c b/bin/tests/dst/t_dst.c index 766b972616..0c3b93e28e 100644 --- a/bin/tests/dst/t_dst.c +++ b/bin/tests/dst/t_dst.c @@ -655,13 +655,12 @@ sig_fromfile(char *path, isc_buffer_t *iscbuf) { len = (size_t)size; p = buf; - while (len) { + while (len != 0U) { isc_result = isc_stdio_read(p, 1, len, fp, &rval); if (isc_result == ISC_R_SUCCESS) { len -= rval; p += rval; - } - else { + } else { t_info("read failed %d, result: %s\n", (int)rval, isc_result_totext(isc_result)); (void) free(buf); @@ -673,12 +672,12 @@ sig_fromfile(char *path, isc_buffer_t *iscbuf) { p = buf; len = size; - while (len > 0) { + while (len > 0U) { if ((*p == '\r') || (*p == '\n')) { ++p; --len; continue; - } else if (len < 2) + } else if (len < 2U) return (1); if (('0' <= *p) && (*p <= '9')) val = *p - '0';