]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix dprintf, thanks to OBATA Akio.
authorRoy Marples <roy@marples.name>
Wed, 16 Mar 2016 11:26:49 +0000 (11:26 +0000)
committerRoy Marples <roy@marples.name>
Wed, 16 Mar 2016 11:26:49 +0000 (11:26 +0000)
compat/dprintf.c

index 33748d063cac19672839779fc7c270bc7dee7985..610a8f0b9fca7c69e11cdf5eae88bb2c8c0dce79 100644 (file)
@@ -41,7 +41,7 @@ vdprintf(int fd, const char * __restrict fmt, va_list va)
        if ((e = dup(fd)) == -1)
                return -1;
 
-       if ((fp = fdopen(e, "r+")) == NULL) {
+       if ((fp = fdopen(e, "w")) == NULL) {
                close(e);
                return -1;
        }