Skip to content

Commit 84536bd

Browse files
Jari PoyhonenJari Poyhonen
Jari Poyhonen
authored and
Jari Poyhonen
committed
cellular ATHandler update due valgrind run
1 parent b16d8db commit 84536bd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

features/cellular/framework/AT/ATHandler.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -599,13 +599,11 @@ int32_t ATHandler::read_int()
599599
}
600600

601601
char buff[BUFF_SIZE];
602-
char *first_no_digit;
603-
604-
if (read_string(buff, (size_t)sizeof(buff)) == 0) {
602+
if (read_string(buff, sizeof(buff)) == 0) {
605603
return -1;
606604
}
607605

608-
return std::strtol(buff, &first_no_digit, 10);
606+
return std::strtol(buff, NULL, 10);
609607
}
610608

611609
void ATHandler::set_delimiter(char delimiter)
@@ -1211,8 +1209,9 @@ void ATHandler::debug_print(const char *p, int len)
12111209
#if MBED_CONF_MBED_TRACE_ENABLE
12121210
mbed_cellular_trace::mutex_wait();
12131211
#endif
1212+
char c;
12141213
for (ssize_t i = 0; i < len; i++) {
1215-
char c = *p++;
1214+
c = *p++;
12161215
if (!isprint(c)) {
12171216
if (c == '\r') {
12181217
debug("\n");

0 commit comments

Comments
 (0)