#include "stdio_impl.h"
#include <errno.h>
#include <string.h>
+#include <stdlib.h>
#include <inttypes.h>
+#include "libc.h"
struct cookie {
size_t pos, len, size;
struct mem_FILE *f;
int plus = !!strchr(mode, '+');
- if (!size || !strchr("rwa", *mode)) {
+ if (!strchr("rwa", *mode)) {
errno = EINVAL;
return 0;
}