You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ad...@apache.org on 2016/03/05 00:08:48 UTC
[26/27] incubator-mynewt-larva git commit: MYNEWT-230
MYNEWT-230
explictely cast to an integer since some compilers don't like to implicitelty
cast a char to an int
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/ee324af2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/ee324af2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/ee324af2
Branch: refs/heads/develop
Commit: ee324af2dcc761a6c4125b3d374894f2811a5459
Parents: 8b94064
Author: Paul Dietrich <pa...@yahoo.com>
Authored: Thu Mar 3 17:11:13 2016 -0800
Committer: Paul Dietrich <pa...@yahoo.com>
Committed: Thu Mar 3 17:12:23 2016 -0800
----------------------------------------------------------------------
libs/util/src/datetime.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/ee324af2/libs/util/src/datetime.c
----------------------------------------------------------------------
diff --git a/libs/util/src/datetime.c b/libs/util/src/datetime.c
index 902eb55..fe4fb38 100644
--- a/libs/util/src/datetime.c
+++ b/libs/util/src/datetime.c
@@ -211,7 +211,7 @@ parse_number(const char *str, int digits, int *val)
cp = str;
end = str + digits;
while (cp < end) {
- if (!isdigit(*cp)) {
+ if (!isdigit((int) *cp)) {
return (NULL);
}
*val *= 10;
@@ -277,7 +277,7 @@ parse_datetime(const char *input, struct os_timeval *tv, struct os_timezone *tz)
/* parse fractional seconds if specified */
if (*cp == '.') {
ep = ++cp;
- while (isdigit(*ep)) {
+ while (isdigit((int) *ep)) {
ep++;
}
digits = ep - cp;