Commit 5d657571 authored by zwelch's avatar zwelch
Browse files

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
parent d5339d2e
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment