From 9b13a2db10f7fd19574ef9fb5af6aa2c3351d419 Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Tue, 19 Apr 2011 14:12:50 +0000 Subject: [PATCH] * xcoffread.c (process_xcoff_symbol): ARI fix: Avoid assignment inside if clause. --- gdb/ChangeLog | 5 +++++ gdb/xcoffread.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c4a98be285..dfee35abde 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2011-04-19 Pierre Muller + + * xcoffread.c (process_xcoff_symbol): ARI fix: Avoid assignment + inside if clause. + 2011-04-19 Pierre Muller Pedro Alves diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index fd60447210..4dd048d5d9 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -1585,7 +1585,11 @@ process_xcoff_symbol (struct coff_symbol *cs, struct objfile *objfile) where we need to, which is not necessarily super-clean, but seems workable enough. */ - if (*name == ':' || (pp = (char *) strchr (name, ':')) == NULL) + if (*name == ':') + return NULL; + + pp = (char *) strchr (name, ':'); + if (pp == NULL) return NULL; ++pp;