summaryrefslogtreecommitdiff
path: root/gdb/arm-linux-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/arm-linux-tdep.c')
-rw-r--r--gdb/arm-linux-tdep.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 278a665c3b5..953e52542e9 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -1088,6 +1088,7 @@ arm_stap_parse_special_token (struct gdbarch *gdbarch,
{
/* Temporary holder for lookahead. */
const char *tmp = p->arg;
+ char *endp;
/* Used to save the register name. */
const char *start;
char *regname;
@@ -1140,7 +1141,8 @@ arm_stap_parse_special_token (struct gdbarch *gdbarch,
got_minus = 1;
}
- displacement = strtol (tmp, (char **) &tmp, 10);
+ displacement = strtol (tmp, &endp, 10);
+ tmp = endp;
/* Skipping last `]'. */
if (*tmp++ != ']')