Fix signedness comparison for ESP8266 compiler

This commit is contained in:
Pim van Pelt
2018-11-04 16:22:09 +01:00
parent a01e548249
commit f8a13112b6

View File

@ -240,7 +240,7 @@ bool timespec_get_spec(struct mgos_timespec *ts, char *ret, int retlen) {
snprintf(spec_str, sizeof(spec_str) - 1, "%02d:%02d:%02d-%02d:%02d:%02d", t_spec->start_h, t_spec->start_m, t_spec->start_s,
t_spec->stop_h, t_spec->stop_m, t_spec->stop_s);
if (strlen(spec_str) + strlen(ret) > retlen - 1) {
if ((int) (strlen(spec_str) + strlen(ret)) > retlen - 1) {
return false;
}
if (strlen(ret) > 0) {