Skip to content

Commit

Permalink
Merge pull request #730 from fjtrujy/fixFOpenFlagsSrxFixUp
Browse files Browse the repository at this point in the history
Stop using "e" flags when using `fopen` as it is not standard
  • Loading branch information
fjtrujy authored Jan 27, 2025
2 parents 07cf7e1 + 7bdd947 commit 5adf42b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tools/srxfixup/src/elflib.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ elf_file *read_elf(const char *filename)
elf_file *elf;
FILE *fp;

fp = fopen(filename, "rbe");
fp = fopen(filename, "rb");
if ( !fp )
{
fprintf(stderr, "\"%s\" can't open (errno=%d)\n", filename, errno);
Expand Down Expand Up @@ -626,7 +626,7 @@ int write_elf(elf_file *elf, const char *filename)
{
FILE *fp;

fp = fopen(filename, "wbe");
fp = fopen(filename, "wb");
if ( !fp )
{
fprintf(stderr, "\"%s\" can't open (errno=%d)\n", filename, errno);
Expand Down
2 changes: 1 addition & 1 deletion tools/srxfixup/src/readconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Srx_gen_table *read_conf(const char *indata, const char *infile, int dumpopt)
}
if ( infile )
{
fp = fopen(infile, "re");
fp = fopen(infile, "r");
if ( !fp )
{
fprintf(stderr, "\"%s\" can't open (errno=%d)\n", infile, errno);
Expand Down

0 comments on commit 5adf42b

Please sign in to comment.