fix uninitialized mode variable in openat function
authorRich Felker <dalias@aerifal.cx>
Fri, 31 Oct 2014 19:35:24 +0000 (15:35 -0400)
committerRich Felker <dalias@aerifal.cx>
Fri, 31 Oct 2014 19:35:24 +0000 (15:35 -0400)
this was introduced in commit 2da3ab1382ca8e39eb1e4428103764a81fba73d3
as an oversight while making the variadic argument access conditional.

src/fcntl/openat.c

index 4faeb29..e741336 100644 (file)
@@ -5,7 +5,7 @@
 
 int openat(int fd, const char *filename, int flags, ...)
 {
-       mode_t mode;
+       mode_t mode = 0;
 
        if ((flags & O_CREAT) || (flags & O_TMPFILE) == O_TMPFILE) {
                va_list ap;