From e325fb69b4ae1a9f5d276672a883e864861d90d8 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Tue, 1 Mar 2011 22:16:40 +0000 Subject: [PATCH] 2011-03-01 Michael Snyder * linespec.c (decode_line_1): Remove unnecessary null check. --- gdb/ChangeLog | 2 ++ gdb/linespec.c | 13 +++++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 59eaa44..e9e1a9d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2011-03-01 Michael Snyder + * linespec.c (decode_line_1): Remove unnecessary null check. + * tracepoint.c (scope_info): Fix mem leak, remove underused variable. diff --git a/gdb/linespec.c b/gdb/linespec.c index e9548e8..5979c16 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -726,7 +726,7 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab, char *copy; /* This says whether or not something in *ARGPTR is quoted with completer_quotes (i.e. with single quotes). */ - int is_quoted = 0; + int is_quoted; /* Is *ARGPTR is enclosed in double quotes? */ int is_quote_enclosed; int is_objc_method = 0; @@ -745,14 +745,11 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab, /* See if arg is *PC. */ - if (*argptr) - { - if (**argptr == '*') - return decode_indirect (argptr); + if (**argptr == '*') + return decode_indirect (argptr); - is_quoted = (strchr (get_gdb_completer_quote_characters (), - **argptr) != NULL); - } + is_quoted = (strchr (get_gdb_completer_quote_characters (), + **argptr) != NULL); if (is_quoted) end_quote = skip_quoted (*argptr); -- 2.7.4