aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-04-12 17:42:35 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-10-16 14:19:23 -0300
commit4b962c9e859de23b461d61f860dbd3f21311e83a (patch)
tree990816522fcfd5b363a5a3a4b25ff41531f52feb /include
parent905ae44c77a4b899100de99360823a586e095622 (diff)
downloadglibc-4b962c9e859de23b461d61f860dbd3f21311e83a.tar
glibc-4b962c9e859de23b461d61f860dbd3f21311e83a.tar.gz
glibc-4b962c9e859de23b461d61f860dbd3f21311e83a.tar.bz2
glibc-4b962c9e859de23b461d61f860dbd3f21311e83a.zip
linux: Simplify opendir buffer allocation
The fallback allocation is removed, so the possible size constraint should be analyzed just once; __alloc_dir assumes that 'statp' argument is non-null, and the max_buffer_size move to close its used. Checked on x86_64-linux-gnu and i686-linux-gnu.
Diffstat (limited to 'include')
-rw-r--r--include/dirent.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/dirent.h b/include/dirent.h
index 2b1cdcf8bd..fdf4c4a2f1 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -48,7 +48,8 @@ extern int __versionsort64 (const struct dirent64 **a,
const struct dirent64 **b)
__attribute_pure__;
extern DIR *__alloc_dir (int fd, bool close_fd, int flags,
- const struct stat64 *statp) attribute_hidden;
+ const struct stat64 *statp)
+ __nonnull (4) attribute_hidden;
extern __typeof (rewinddir) __rewinddir;
extern __typeof (seekdir) __seekdir;
extern __typeof (dirfd) __dirfd;