From patchwork Wed Nov 8 18:01:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luke Shumaker X-Patchwork-Id: 24159 Received: (qmail 8450 invoked by alias); 8 Nov 2017 18:01:28 -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 8389 invoked by uid 89); 8 Nov 2017 18:01:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=H*F:D*nu, outcome X-HELO: mav.lukeshu.com From: Luke Shumaker To: libc-alpha@sourceware.org Cc: christian.brauner@mailbox.org Subject: [PATCH v3 3/6] linux ttyname: Change return type of is_pty from int to bool Date: Wed, 8 Nov 2017 13:01:16 -0500 Message-Id: <20171108180119.26721-4-lukeshu@parabola.nu> In-Reply-To: <20171108180119.26721-1-lukeshu@parabola.nu> References: <20171108180119.26721-1-lukeshu@parabola.nu> is_pty returning a bool is fine since there's no possible outcome other than true or false, and bool is used throughout the codebase. v2: - Introduce as part of another commit v3: - Split into a separate commit --- ChangeLog | 3 +++ sysdeps/unix/sysv/linux/ttyname.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 095baf9eb6..11709a01ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2017-11-07 Luke Shumaker + * sysdeps/unix/sysv/linux/ttyname.h (is_pty): Change return type from + int to bool. + * sysdeps/unix/sysv/linux/ttyname.h (is_pty): Update doc reference. * manual/terminal.texi (Is It a Terminal): diff --git a/sysdeps/unix/sysv/linux/ttyname.h b/sysdeps/unix/sysv/linux/ttyname.h index cbcdbab607..ce4845a587 100644 --- a/sysdeps/unix/sysv/linux/ttyname.h +++ b/sysdeps/unix/sysv/linux/ttyname.h @@ -23,7 +23,7 @@ /* Return true if this is a UNIX98 pty device, as defined in linux/Documentation/devices.txt (on linux < 4.10) or linux/Documentation/admin-guide/devices.txt (on linux >= 4.10). */ -static inline int +static inline bool is_pty (struct stat64 *sb) { #ifdef _STATBUF_ST_RDEV