avoid "rb" fopen in hash_file() on windows, who cares, code handles \r (or missing \r) to have consistent results

This commit is contained in:
Stefan Frederik 2021-12-10 15:19:24 +01:00
parent 5a3ea573cd
commit 875581a4fb
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ unsigned int hash_file(const char *f)
int cr = 0;
unsigned int h=5381;
char line[4096];
fd = fopen(f, fopen_read_mode); /* "r" on linux, "rb" on windows */
fd = fopen(f, "r"); /* windows won't return \r in the lines and we chop them out anyway in the code */
if(fd) {
while( fgets(line, sizeof(line), fd) ) {
n = strlen(line);