This is an automated email from the ASF dual-hosted git repository.
wes3 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new c9a3c6bc5 sys/config: fix CONF_FLOAT
c9a3c6bc5 is described below
commit c9a3c6bc55ef0a4abc46633ecab9045bf88f4f59
Author: Will San Filippo <[email protected]>
AuthorDate: Wed Sep 13 10:58:37 2023 -0400
sys/config: fix CONF_FLOAT
The check in conf_value_from_str for CONF_FLOAT is incorrect.
FLT_MIN is not the smallest negative float; it is the smallest
positive float. Removing the check for min/max value as it is
not needed in this case.
---
sys/config/src/config.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/sys/config/src/config.c b/sys/config/src/config.c
index cb35d56b0..62c3be9f4 100644
--- a/sys/config/src/config.c
+++ b/sys/config/src/config.c
@@ -228,9 +228,6 @@ conf_value_from_str(char *val_str, enum conf_type type,
void *vp, int maxlen)
if (*eptr != '\0') {
goto err;
}
- if ((fval < FLT_MIN) || (fval > FLT_MAX)) {
- goto err;
- }
*(float *)vp = fval;
break;
case CONF_STRING: