[v3,3/6] linux ttyname: Change return type of is_pty from int to bool
Commit Message
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(-)
@@ -1,5 +1,8 @@
2017-11-07 Luke Shumaker <lukeshu@parabola.nu>
+ * 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):
@@ -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