From 7703b1d61eb36faee6ce17bd08a08b7f4393147b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 2 Jan 2015 22:07:36 +0100 Subject: [PATCH] Silent a signed-comparison warning in the _isds_b64decode() Proper type for _isds_base64_decode_block() return value is size_t. Using it also eliminates the warning. --- src/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.c b/src/utils.c index 668f763..85d4630 100644 --- a/src/utils.c +++ b/src/utils.c @@ -271,7 +271,7 @@ _hidden size_t _isds_b64decode(const char *encoded, void **plain) { base64_decodestate state; size_t encoded_length; - int plain_length; + size_t plain_length; char *buffer; if (NULL == encoded || NULL == plain) { @@ -299,7 +299,7 @@ _hidden size_t _isds_b64decode(const char *encoded, void **plain) { /* Decode encoded data */ plain_length = _isds_base64_decode_block((const int8_t *)encoded, encoded_length, *plain, &state); - if (plain_length < 0 || plain_length >= (size_t) -1) { + if (plain_length >= (size_t) -1) { zfree(*plain); return((size_t) -1); } -- 2.11.4.GIT