projects
/
project
/
ustream-ssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5896991
)
ustream-mbedtls: fix comparison of integers of different signs
author
Petr Štetiar
<ynezz@true.cz>
Thu, 10 Dec 2020 11:09:48 +0000
(12:09 +0100)
committer
Petr Štetiar
<ynezz@true.cz>
Thu, 10 Dec 2020 11:24:34 +0000
(12:24 +0100)
Fixes following compiler extra warning:
ustream-mbedtls.c:40:11: error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
if (slen > len)
~~~~ ^ ~~~
Signed-off-by: Petr Štetiar <ynezz@true.cz>
ustream-mbedtls.c
patch
|
blob
|
history
diff --git
a/ustream-mbedtls.c
b/ustream-mbedtls.c
index 9f73c58360348fc62534ad69d696a71ed7c636dd..3424743c64521105e6facf39a3035eec1284fc5a 100644
(file)
--- a/
ustream-mbedtls.c
+++ b/
ustream-mbedtls.c
@@
-37,7
+37,7
@@
static int s_ustream_read(void *ctx, unsigned char *buf, size_t len)
return 0;
sbuf = ustream_get_read_buf(s, &slen);
- if (slen > len)
+ if (
(size_t)
slen > len)
slen = len;
if (!slen)