From 5cb316ef79dafb9f22426015584817e5e2756507 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Fri, 7 Feb 2003 00:27:31 +0000 Subject: 2003-02-06 Andrew Cagney * linux-proc.c: Include "gdb_stat.h" instead of . * cp-valprint.c (cp_print_value_fields): Eliminate STREQN. * jv-typeprint.c (java_type_print_base): Ditto. * typeprint.c (typedef_print): Eliminate STREQ. * cli/cli-script.c (define_command, define_command): Ditto. * main.c (captured_main): Ditto. * values.c (lookup_internalvar): Ditto. * utils.c (safe_strerror, parse_escape): Eliminate assignment within `if' conditional. * linespec.c (decode_line_2): Ditto. * cli/cli-dump.c (bfd_openr_with_cleanup): Ditto. (bfd_openw_with_cleanup): Ditto. Index: mi/ChangeLog 2003-02-06 Andrew Cagney * mi-cmd-env.c: Include "gdb_stat.h" instead of . --- gdb/utils.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gdb/utils.c') diff --git a/gdb/utils.c b/gdb/utils.c index 6d9e429..0d9fb31 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -831,7 +831,8 @@ safe_strerror (int errnum) char *msg; static char buf[32]; - if ((msg = strerror (errnum)) == NULL) + msg = strerror (errnum); + if (msg == NULL) { sprintf (buf, "(undocumented errno %d)", errnum); msg = buf; @@ -1447,14 +1448,15 @@ parse_escape (char **string_ptr) register int count = 0; while (++count < 3) { - if ((c = *(*string_ptr)++) >= '0' && c <= '7') + c = (**string_ptr); + if (c >= '0' && c <= '7') { + (*string_ptr)++; i *= 8; i += c - '0'; } else { - (*string_ptr)--; break; } } -- cgit v1.1