diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2017-11-15 20:33:11 +0100 |
---|---|---|
committer | Christian Brauner <christian.brauner@ubuntu.com> | 2017-11-15 20:47:02 +0100 |
commit | d10d6cab168ffa26ef6a506655ee5dc8537c8ed7 (patch) | |
tree | ccd40f8f9aebad8556d7fb8b7d65ac07d0fd0eb8 /sysdeps | |
parent | 9b5a87502d048905c383b65c51768f4a1db8c685 (diff) | |
download | glibc-d10d6cab168ffa26ef6a506655ee5dc8537c8ed7.zip glibc-d10d6cab168ffa26ef6a506655ee5dc8537c8ed7.tar.gz glibc-d10d6cab168ffa26ef6a506655ee5dc8537c8ed7.tar.bz2 |
linux ttyname: Change return type of is_pty from int to bool
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.
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/ttyname.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/ttyname.h b/sysdeps/unix/sysv/linux/ttyname.h index cbcdbab..cdaf60f 100644 --- a/sysdeps/unix/sysv/linux/ttyname.h +++ b/sysdeps/unix/sysv/linux/ttyname.h @@ -16,6 +16,7 @@ not, see <http://www.gnu.org/licenses/>. */ #include <unistd.h> +#include <stdbool.h> #include <sys/sysmacros.h> #include <sys/types.h> #include <sys/stat.h> @@ -23,7 +24,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 |