Use thread-safe ntoa functions

NXStyle fixes

Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

API fixes and NXStyle fixes

Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Use thread-safe ntoa functions

NXStyle fixes

Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

API fixes and NXStyle fixes

Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Peter van der Perk
2022-08-01 11:18:52 +02:00
committed by Xiang Xiao
parent c5102fe504
commit dcd60a2abe
11 changed files with 192 additions and 114 deletions

View File

@@ -1130,6 +1130,8 @@ int cmd_arp(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
#endif
if (strcmp(argv[1], "-a") == 0)
{
char hwaddr[20];
if (argc != 3)
{
goto errout_toomany;
@@ -1147,7 +1149,7 @@ int cmd_arp(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
goto errout_cmdfaild;
}
nsh_output(vtbl, "HWaddr: %s\n", ether_ntoa(&mac));
nsh_output(vtbl, "HWaddr: %s\n", ether_ntoa_r(&mac, hwaddr));
}
else if (strcmp(argv[1], "-d") == 0)
{