* 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
This commit is contained in:
Steve Chamberlain
1993-01-06 18:22:01 +00:00
parent 81028ab0e7
commit a944e79a99
3 changed files with 13 additions and 18 deletions

View 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);
}
@@ -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);
}