mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2026-01-26 21:41:34 +03:00
Always fopen files with "rb"
We never want translation of newlines when reading files, so it should be safe to always specify "rb". On sane platforms, the "b" flag is simply ignored.
This commit is contained in:
14
testHTML.c
14
testHTML.c
@@ -627,11 +627,7 @@ parseSAXFile(char *filename) {
|
||||
if (push) {
|
||||
FILE *f;
|
||||
|
||||
#if defined(_WIN32)
|
||||
f = fopen(filename, "rb");
|
||||
#else
|
||||
f = fopen(filename, "r");
|
||||
#endif
|
||||
if (f != NULL) {
|
||||
int res, size = 3;
|
||||
char chars[4096];
|
||||
@@ -657,11 +653,7 @@ parseSAXFile(char *filename) {
|
||||
fclose(f);
|
||||
}
|
||||
if (!noout) {
|
||||
#if defined(_WIN32)
|
||||
f = fopen(filename, "rb");
|
||||
#else
|
||||
f = fopen(filename, "r");
|
||||
#endif
|
||||
f = fopen(filename, "rb");
|
||||
if (f != NULL) {
|
||||
int res, size = 3;
|
||||
char chars[4096];
|
||||
@@ -721,11 +713,7 @@ parseAndPrintFile(char *filename) {
|
||||
if (push) {
|
||||
FILE *f;
|
||||
|
||||
#if defined(_WIN32)
|
||||
f = fopen(filename, "rb");
|
||||
#else
|
||||
f = fopen(filename, "r");
|
||||
#endif
|
||||
if (f != NULL) {
|
||||
int res, size = 3;
|
||||
char chars[4096];
|
||||
|
||||
Reference in New Issue
Block a user