pkarashchenko commented on code in PR #1423: URL: https://github.com/apache/incubator-nuttx-apps/pull/1423#discussion_r1027105886
########## netutils/netlib/netlib_ipv6route.c: ########## @@ -131,9 +131,12 @@ ssize_t netlib_read_ipv6route(FILE *stream, return 0; } - /* The first line of the group should consist of a number index */ + /* The first non-space char of the first line of the group should consist of a number index */ + int idx = 0; Review Comment: declare at the top of the function ########## netutils/netlib/netlib_ipv6route.c: ########## @@ -131,9 +131,12 @@ ssize_t netlib_read_ipv6route(FILE *stream, return 0; } - /* The first line of the group should consist of a number index */ + /* The first non-space char of the first line of the group should consist of a number index */ + int idx = 0; + while (isspace(line[idx])) + idx++; Review Comment: ```suggestion while (isspace(line[idx])) { idx++; } ``` but anyway I do not see how this could should help if below we still check `line[0]` and not `line[idx]`. Also line `addr = &line[ADDR_OFFSET];` know nothing about `idx`. To me this change looks quite suspicious. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org