We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f30f763 + 0860f3e commit dc64165Copy full SHA for dc64165
features/cellular/framework/AT/ATHandler.cpp
@@ -18,6 +18,7 @@
18
#include <ctype.h>
19
#include <stdio.h>
20
#include <limits.h>
21
+#include <errno.h>
22
#include "ATHandler.h"
23
#include "mbed_poll.h"
24
#include "FileHandle.h"
@@ -748,8 +749,7 @@ int32_t ATHandler::read_int()
748
749
}
750
751
errno = 0;
- char *endptr;
752
- long result = std::strtol(buff, &endptr, 10);
+ long result = std::strtol(buff, NULL, 10);
753
if ((result == LONG_MIN || result == LONG_MAX) && errno == ERANGE) {
754
return -1; // overflow/underflow
755
0 commit comments