diff options
Diffstat (limited to 'gdb/maint.c')
-rw-r--r-- | gdb/maint.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/maint.c b/gdb/maint.c index dd974b7d0d5..8a8df594809 100644 --- a/gdb/maint.c +++ b/gdb/maint.c @@ -425,10 +425,12 @@ maintenance_do_deprecate (char *text, int deprecate) if (deprecate) { /* look for a replacement command */ - if (start_ptr = strchr (text, '\"')) + start_ptr = strchr (text, '\"'); + if (start_ptr != NULL) { start_ptr++; - if (end_ptr = strrchr (start_ptr, '\"')) + end_ptr = strrchr (start_ptr, '\"'); + if (end_ptr != NULL) { len = end_ptr - start_ptr; start_ptr[len] = '\0'; |