From: Luke Shumaker Date: Wed, 15 Nov 2017 19:33:11 +0000 (+0100) Subject: linux ttyname: Change return type of is_pty from int to bool X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd81a9d1e99f04d0b664542ddec2d270789f7ec1;p=thirdparty%2Fglibc.git 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 (cherry picked from commit d10d6cab168ffa26ef6a506655ee5dc8537c8ed7) --- diff --git a/ChangeLog b/ChangeLog index 1fb584ae207..91e12d0f20b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-11-15 Luke Shumaker + + * sysdeps/unix/sysv/linux/ttyname.h (is_pty): Change return type from + int to bool. + 2017-11-15 Luke Shumaker * sysdeps/unix/sysv/linux/ttyname.h (is_pty): Update doc reference. diff --git a/sysdeps/unix/sysv/linux/ttyname.h b/sysdeps/unix/sysv/linux/ttyname.h index cbcdbab6079..cdaf60fb871 100644 --- a/sysdeps/unix/sysv/linux/ttyname.h +++ b/sysdeps/unix/sysv/linux/ttyname.h @@ -16,6 +16,7 @@ not, see . */ #include +#include #include #include #include @@ -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