X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Fferror.c;h=d692eed9418ea1f0cf36c948bacad20d6afc526c;hb=6d861ac87491a207e4599c44b61d142f0a601c2d;hp=8288a93d96713babe9dc76ae5dab03a2aab14037;hpb=6a4b9472fb0a85e55030b37ec3017ba0319e03f9;p=musl diff --git a/src/stdio/ferror.c b/src/stdio/ferror.c index 8288a93d..d692eed9 100644 --- a/src/stdio/ferror.c +++ b/src/stdio/ferror.c @@ -4,7 +4,10 @@ int ferror(FILE *f) { - return !!(f->flags & F_ERR); + FLOCK(f); + int ret = !!(f->flags & F_ERR); + FUNLOCK(f); + return ret; } weak_alias(ferror, ferror_unlocked);