tree-wide: do not use "re" with fmemopen
The man page says nothing about "e". Glibc clearly accepts it without fuss, but it is meaningless for a memory object (and probably doesn't work). This use is not portable, so let's avoid it.
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ static inline FILE* data_to_file(const uint8_t *data, size_t size) {
|
||||
if (size == 0)
|
||||
return fopen("/dev/null", "re");
|
||||
else
|
||||
return fmemopen_unlocked((char*) data, size, "re");
|
||||
return fmemopen_unlocked((char*) data, size, "r");
|
||||
}
|
||||
|
||||
/* Check if we are within the specified size range.
|
||||
|
||||
Reference in New Issue
Block a user