From patchwork Thu Apr 24 11:25:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 663 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (peon2454.g.dreamhost.com [208.113.200.127]) by wilcox.dreamhost.com (Postfix) with ESMTP id CEC98360830 for ; Thu, 24 Apr 2014 04:26:14 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14307373) id 7BEEA1330836; Thu, 24 Apr 2014 04:26:14 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx21.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id 77A4013B3BB8 for ; Thu, 24 Apr 2014 04:26:12 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=aDnwbMGmAnLrz/ejTcWd1O7lhFpfT yJ7aPTjQ+Bun2PTqRFR5BRvGsD3yRHUeqWbDnn1dDb9XajZyIKhBliZ8PnVXDHub rJ57D3PjVmWWZ8HQDuRvJFMdmnkjrVYJ5LdX/7+fK0n6bMi3LvvsRWiffp1Agv0k g8rATDw2dCtQTA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:mime-version :content-type; s=default; bh=8a8tuYrX1OheEtQoPjLYTNEfI+I=; b=HdM 9zsNplkiKPTkNd9cSF9tiJv9ZvVQLXeFK+ro76cEYoJKa3G+4wyHSd2v6kaBntEB aAyW7Ax5uyMurkGEURCiviy2wV83DqNl4qYwffXNsfivpBrkw6LzseUE3oYcmtqC jcrG8hMmaB7/Raa30Yn8CtF2V+M1VZnyuVnCPR8M= Received: (qmail 6025 invoked by alias); 24 Apr 2014 11:26:10 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 6009 invoked by uid 89); 24 Apr 2014 11:26:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: plane.gmane.org To: libc-alpha@sourceware.org From: Rasmus Villemoes Subject: [PATCH] Use mode_t in open and friends Date: Thu, 24 Apr 2014 13:25:49 +0200 Lines: 201 Message-ID: <87k3afhsua.fsf@rasmusvillemoes.dk> Mime-Version: 1.0 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-DH-Original-To: glibc@patchwork.siddhesh.in The sole varargs argument to open and friends has type mode_t, not int. Signed-off-by: Rasmus Villemoes --- io/open.c | 4 ++-- io/open64.c | 4 ++-- io/openat.c | 4 ++-- io/openat64.c | 4 ++-- sysdeps/posix/open64.c | 4 ++-- sysdeps/unix/sysv/linux/generic/open.c | 8 ++++---- sysdeps/unix/sysv/linux/generic/open64.c | 4 ++-- sysdeps/unix/sysv/linux/open64.c | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/io/open.c b/io/open.c index 24aa380..5be57a1 100644 --- a/io/open.c +++ b/io/open.c @@ -30,7 +30,7 @@ __libc_open (file, oflag) const char *file; int oflag; { - int mode; + mode_t mode; if (file == NULL) { @@ -42,7 +42,7 @@ __libc_open (file, oflag) { va_list arg; va_start(arg, oflag); - mode = va_arg(arg, int); + mode = va_arg(arg, mode_t); va_end(arg); } diff --git a/io/open64.c b/io/open64.c index 3f3d2e8..b740ab6 100644 --- a/io/open64.c +++ b/io/open64.c @@ -28,7 +28,7 @@ __libc_open64 (file, oflag) const char *file; int oflag; { - int mode; + mode_t mode; if (file == NULL) { @@ -40,7 +40,7 @@ __libc_open64 (file, oflag) { va_list arg; va_start (arg, oflag); - mode = va_arg (arg, int); + mode = va_arg (arg, mode_t); va_end (arg); } diff --git a/io/openat.c b/io/openat.c index 2d82270..aac603c 100644 --- a/io/openat.c +++ b/io/openat.c @@ -38,7 +38,7 @@ __openat (fd, file, oflag) const char *file; int oflag; { - int mode; + mode_t mode; if (file == NULL) { @@ -64,7 +64,7 @@ __openat (fd, file, oflag) { va_list arg; va_start (arg, oflag); - mode = va_arg (arg, int); + mode = va_arg (arg, mode_t); va_end (arg); } diff --git a/io/openat64.c b/io/openat64.c index c0c4e19..1f126fc 100644 --- a/io/openat64.c +++ b/io/openat64.c @@ -31,7 +31,7 @@ __openat64 (fd, file, oflag) const char *file; int oflag; { - int mode; + mode_t mode; if (file == NULL) { @@ -57,7 +57,7 @@ __openat64 (fd, file, oflag) { va_list arg; va_start (arg, oflag); - mode = va_arg (arg, int); + mode = va_arg (arg, mode_t); va_end (arg); } diff --git a/sysdeps/posix/open64.c b/sysdeps/posix/open64.c index 64d192a..9364454 100644 --- a/sysdeps/posix/open64.c +++ b/sysdeps/posix/open64.c @@ -24,13 +24,13 @@ int __libc_open64 (const char *file, int oflag, ...) { - int mode = 0; + mode_t mode = 0; if (oflag & O_CREAT) { va_list arg; va_start (arg, oflag); - mode = va_arg (arg, int); + mode = va_arg (arg, mode_t); va_end (arg); } diff --git a/sysdeps/unix/sysv/linux/generic/open.c b/sysdeps/unix/sysv/linux/generic/open.c index 4f73fa0..d243933 100644 --- a/sysdeps/unix/sysv/linux/generic/open.c +++ b/sysdeps/unix/sysv/linux/generic/open.c @@ -27,13 +27,13 @@ int __libc_open (const char *file, int oflag, ...) { - int mode = 0; + mode_t mode = 0; if (oflag & O_CREAT) { va_list arg; va_start (arg, oflag); - mode = va_arg (arg, int); + mode = va_arg (arg, mode_t); va_end (arg); } @@ -57,13 +57,13 @@ weak_alias (__libc_open, open) int __open_nocancel (const char *file, int oflag, ...) { - int mode = 0; + mode_t mode = 0; if (oflag & O_CREAT) { va_list arg; va_start (arg, oflag); - mode = va_arg (arg, int); + mode = va_arg (arg, mode_t); va_end (arg); } diff --git a/sysdeps/unix/sysv/linux/generic/open64.c b/sysdeps/unix/sysv/linux/generic/open64.c index 93d79e3..e367e12 100644 --- a/sysdeps/unix/sysv/linux/generic/open64.c +++ b/sysdeps/unix/sysv/linux/generic/open64.c @@ -27,13 +27,13 @@ int __libc_open64 (const char *file, int oflag, ...) { - int mode = 0; + mode_t mode = 0; if (oflag & O_CREAT) { va_list arg; va_start (arg, oflag); - mode = va_arg (arg, int); + mode = va_arg (arg, mode_t); va_end (arg); } diff --git a/sysdeps/unix/sysv/linux/open64.c b/sysdeps/unix/sysv/linux/open64.c index 0d63806..442a2ef 100644 --- a/sysdeps/unix/sysv/linux/open64.c +++ b/sysdeps/unix/sysv/linux/open64.c @@ -26,13 +26,13 @@ int __libc_open64 (const char *file, int oflag, ...) { - int mode = 0; + mode_t mode = 0; if (oflag & O_CREAT) { va_list arg; va_start (arg, oflag); - mode = va_arg (arg, int); + mode = va_arg (arg, mode_t); va_end (arg); }