summaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index ba4e798696d..17c3d6dbc64 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -198,8 +198,10 @@ strip_bg_char (args)
char **args;
{
char *p = NULL;
-
- if (p = strchr (*args, '&'))
+
+ p = strchr (*args, '&');
+
+ if (p)
{
if (p == (*args + strlen (*args) - 1))
{