[PATCH] linux ttyname and ttyname_r: return link if appropriate

Andreas Schwab schwab@linux-m68k.org
Mon Oct 3 07:29:00 GMT 2016


On Okt 03 2016, "Serge E. Hallyn" <serge@hallyn.com> wrote:

> @@ -170,12 +184,19 @@ ttyname (int fd)
>  #ifdef _STATBUF_ST_RDEV
>  	  && S_ISCHR (st1.st_mode)
>  	  && st1.st_rdev == st.st_rdev
> -#else
> +#endif
>  	  && st1.st_ino == st.st_ino
>  	  && st1.st_dev == st.st_dev
> -#endif
>  	  )

Please unfold the paren.

> @@ -152,12 +166,20 @@ __ttyname_r (int fd, char *buf, size_t buflen)
>  #ifdef _STATBUF_ST_RDEV
>  	  && S_ISCHR (st1.st_mode)
>  	  && st1.st_rdev == st.st_rdev
> -#else
> +#endif
>  	  && st1.st_ino == st.st_ino
>  	  && st1.st_dev == st.st_dev
> -#endif
>  	  )

Likewise.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Libc-alpha mailing list