Skip to content

Commit 5adf42b

Browse files
authored
Merge pull request #730 from fjtrujy/fixFOpenFlagsSrxFixUp
Stop using "e" flags when using `fopen` as it is not standard
2 parents 07cf7e1 + 7bdd947 commit 5adf42b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tools/srxfixup/src/elflib.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ elf_file *read_elf(const char *filename)
3535
elf_file *elf;
3636
FILE *fp;
3737

38-
fp = fopen(filename, "rbe");
38+
fp = fopen(filename, "rb");
3939
if ( !fp )
4040
{
4141
fprintf(stderr, "\"%s\" can't open (errno=%d)\n", filename, errno);
@@ -626,7 +626,7 @@ int write_elf(elf_file *elf, const char *filename)
626626
{
627627
FILE *fp;
628628

629-
fp = fopen(filename, "wbe");
629+
fp = fopen(filename, "wb");
630630
if ( !fp )
631631
{
632632
fprintf(stderr, "\"%s\" can't open (errno=%d)\n", filename, errno);

tools/srxfixup/src/readconf.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Srx_gen_table *read_conf(const char *indata, const char *infile, int dumpopt)
9393
}
9494
if ( infile )
9595
{
96-
fp = fopen(infile, "re");
96+
fp = fopen(infile, "r");
9797
if ( !fp )
9898
{
9999
fprintf(stderr, "\"%s\" can't open (errno=%d)\n", infile, errno);

0 commit comments

Comments
 (0)