* symtab.c (decode_line_1): Use end of block to figure out whether
[deliverable/binutils-gdb.git] / gdb / state.c
index 8b51bf704143b206598096701c4b368f1fd4e46b..64f86d6bb9f3f1e9a22eb54f26811c6fceff986b 100644 (file)
@@ -198,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;
@@ -461,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);
     }
@@ -470,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\"? ",
@@ -517,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);
     }
@@ -533,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.024757 seconds and 4 git commands to generate.