aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-02-07 00:27:31 +0000
committerAndrew Cagney <cagney@redhat.com>2003-02-07 00:27:31 +0000
commit5cb316ef79dafb9f22426015584817e5e2756507 (patch)
treeb0113d47cc5db9e154dc221ff0e2ad9b1a315bea /gdb/cli
parente77e4e3ff8cfb6ed2702578da42d2bff8ec257ae (diff)
downloadgdb-5cb316ef79dafb9f22426015584817e5e2756507.zip
gdb-5cb316ef79dafb9f22426015584817e5e2756507.tar.gz
gdb-5cb316ef79dafb9f22426015584817e5e2756507.tar.bz2
2003-02-06 Andrew Cagney <ac131313@redhat.com>
* linux-proc.c: Include "gdb_stat.h" instead of <sys/stat.h>. * 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 <ac131313@redhat.com> * mi-cmd-env.c: Include "gdb_stat.h" instead of <sys/stat.h>.
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-dump.c6
-rw-r--r--gdb/cli/cli-script.c4
2 files changed, 6 insertions, 4 deletions
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c
index 7a58fcb..6bd40e0 100644
--- a/gdb/cli/cli-dump.c
+++ b/gdb/cli/cli-dump.c
@@ -132,7 +132,8 @@ bfd_openr_with_cleanup (const char *filename, const char *target)
{
bfd *ibfd;
- if ((ibfd = bfd_openr (filename, target)) == NULL)
+ ibfd = bfd_openr (filename, target);
+ if (ibfd == NULL)
error ("Failed to open %s: %s.", filename,
bfd_errmsg (bfd_get_error ()));
@@ -150,7 +151,8 @@ bfd_openw_with_cleanup (char *filename, const char *target, char *mode)
if (*mode == 'w') /* Write: create new file */
{
- if ((obfd = bfd_openw (filename, target)) == NULL)
+ obfd = bfd_openw (filename, target);
+ if (obfd == NULL)
error ("Failed to open %s: %s.", filename,
bfd_errmsg (bfd_get_error ()));
make_cleanup_bfd_close (obfd);
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 6b7bec6..d68c365 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -1093,7 +1093,7 @@ define_command (char *comname, int from_tty)
/* Look it up, and verify that we got an exact match. */
c = lookup_cmd (&tem, cmdlist, "", -1, 1);
- if (c && !STREQ (comname, c->name))
+ if (c && strcmp (comname, c->name) != 0)
c = 0;
if (c)
@@ -1126,7 +1126,7 @@ define_command (char *comname, int from_tty)
/* Look up cmd it hooks, and verify that we got an exact match. */
tem = comname + hook_name_size;
hookc = lookup_cmd (&tem, cmdlist, "", -1, 0);
- if (hookc && !STREQ (comname + hook_name_size, hookc->name))
+ if (hookc && strcmp (comname + hook_name_size, hookc->name) != 0)
hookc = 0;
if (!hookc)
{