From a944e79a999ca5504b9f4220943032b5bbcc1e93 Mon Sep 17 00:00:00 2001 From: Steve Chamberlain Date: Wed, 6 Jan 1993 18:22:01 +0000 Subject: * symfile.c: If O_BINARY isn't defined, set it to 0, call openp for binary files oring in the right bit. * main.c, source.c, state.c, symmisc.c: use macros defined in fopen-{bin|both} when fopening files. * remote-hms.c, remote-sim.c: lint --- gdb/state.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gdb/state.c') diff --git a/gdb/state.c b/gdb/state.c index 51b73fa..64f86d6 100644 --- a/gdb/state.c +++ b/gdb/state.c @@ -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); } @@ -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); } -- cgit v1.1