You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2023/01/13 13:11:25 UTC
[nuttx] branch master updated: fix the some else bug of strtold
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 1f95cfdde8 fix the some else bug of strtold
1f95cfdde8 is described below
commit 1f95cfdde8338f99116f64d59db43ca146d791ae
Author: lilei19 <li...@xiaomi.com>
AuthorDate: Fri Jan 13 18:42:35 2023 +0800
fix the some else bug of strtold
I accidentally changed it when I was optimizing the code
Signed-off-by: lilei19 <li...@xiaomi.com>
---
libs/libc/stdlib/lib_strtold.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libs/libc/stdlib/lib_strtold.c b/libs/libc/stdlib/lib_strtold.c
index 13ed2ccf1d..3307150424 100644
--- a/libs/libc/stdlib/lib_strtold.c
+++ b/libs/libc/stdlib/lib_strtold.c
@@ -88,7 +88,7 @@
#define shgetc(f) (*(f)++)
#define shunget(f) ((f)--)
-#define ifexist(a,b) do { if ((*a) != NULL) {*(a) = (b);} } while (0)
+#define ifexist(a,b) do { if ((a) != NULL) {*(a) = (b);} } while (0)
/****************************************************************************
* Private Functions
@@ -394,7 +394,7 @@ static long_double decfloat(FAR char *ptr, FAR char **endptr)
}
}
- if (num_digit <= 9 && num_decimal == 0)
+ if (num_digit < 9 && num_decimal == 0)
{
return x;
}