mirror of
git://git.code.sf.net/p/openocd/code
synced 2025-07-18 23:42:45 +10:00
Use parse_uint helper to replace strtoul call in jtag_tap_by_string.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2212 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
parent
d5339d2eb4
commit
5d657571cb
@ -172,9 +172,8 @@ jtag_tap_t *jtag_tap_by_string(const char *s)
|
||||
}
|
||||
|
||||
/* no tap found by name, so try to parse the name as a number */
|
||||
char *cp;
|
||||
unsigned n = strtoul(s, &cp, 0);
|
||||
if ((s == cp) || (*cp != 0))
|
||||
unsigned n;
|
||||
if (parse_uint(s, &n) != ERROR_OK)
|
||||
return NULL;
|
||||
|
||||
return jtag_tap_by_position(n);
|
||||
|
Loading…
Reference in New Issue
Block a user