From 7bdd947c65da299f28584e0112831c8460c2371c Mon Sep 17 00:00:00 2001 From: Francisco Javier Trujillo Mata Date: Mon, 27 Jan 2025 10:13:05 +0100 Subject: [PATCH] Stop using "e" flags when using `fopen` as it is not standard --- tools/srxfixup/src/elflib.c | 4 ++-- tools/srxfixup/src/readconf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/srxfixup/src/elflib.c b/tools/srxfixup/src/elflib.c index 477d7b35111..f2ece308a91 100644 --- a/tools/srxfixup/src/elflib.c +++ b/tools/srxfixup/src/elflib.c @@ -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); @@ -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); diff --git a/tools/srxfixup/src/readconf.c b/tools/srxfixup/src/readconf.c index 36f19ceef1e..420fbfc80ee 100644 --- a/tools/srxfixup/src/readconf.c +++ b/tools/srxfixup/src/readconf.c @@ -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);