* target.h: Add enum target_waitkind, enum target_signal, and
[deliverable/binutils-gdb.git] / gdb / state.c
index b6ce398015b4444379d2008b3f24622617a884a9..64f86d6bb9f3f1e9a22eb54f26811c6fceff986b 100644 (file)
@@ -64,7 +64,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
    */
 
 
-#include <stdio.h>
 #include "defs.h"
 #include "symtab.h"
 #include "bfd.h"
@@ -199,7 +198,6 @@ static struct formnode *
 alloc_formnode ()
 {
   struct formnode *fnp;
-
   fnp = (struct formnode *) xmalloc (sizeof (struct formnode));
   (void) memset (fnp, 0, sizeof (struct formnode));
   fnp -> sibling = formtree;
@@ -462,7 +460,7 @@ load_state_command (arg_string, from_tty)
   filename = tilde_expand (*argv);
   make_cleanup (free, filename);
 
-  if ((fp = fopen (filename, "r")) == NULL)
+  if ((fp = fopen (filename, FOPEN_RB)) == NULL)
     {
       perror_with_name (filename);
     }
@@ -471,7 +469,7 @@ load_state_command (arg_string, from_tty)
 
   while (*++argv != NULL)
     {
-      if (strcmp (*argv, "symbols") == 0)
+      if (STREQ (*argv, "symbols"))
        {
          if (from_tty
              && !query ("load symbol table state from file \"%s\"? ",
@@ -518,7 +516,7 @@ dump_state_command (arg_string, from_tty)
 
   /* Now attempt to create a fresh state file. */
 
-  if ((asfd = sfd_fopen (filename, "w")) == NULL)
+  if ((asfd = sfd_fopen (filename, FOPEN_WB)) == NULL)
     {
       perror_with_name (filename);
     }
@@ -534,7 +532,7 @@ dump_state_command (arg_string, from_tty)
   fseek (asfd -> fp, sizeof (sf_hdr), SEEK_SET);
   while (*++argv != NULL)
     {
-      if (strcmp (*argv, "objfile") == 0)
+      if (STREQ (*argv, "objfile"))
        {
          write_objfile_state (asfd);
        }
This page took 0.023478 seconds and 4 git commands to generate.