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

Mike Frysinger vapier@gentoo.org
Sat Aug 6 08:46:00 GMT 2016


On 05 Aug 2016 21:08, Serge E. Hallyn wrote:
>  #ifdef _STATBUF_ST_RDEV
>  	  && S_ISCHR (st1.st_mode)
>  	  && st1.st_rdev == st.st_rdev
> +	  && st1.st_dev == st.st_dev
> +	  && st1.st_ino == st.st_ino
>  #else
>  	  && st1.st_ino == st.st_ino
>  	  && st1.st_dev == st.st_dev
>  #endif

wouldn't it be better to shuffle the ifdef then ?
	#ifdef _STATBUF_ST_RDEV
		&& S_ISCHR (st1.st_mode)
		&& st1.st_rdev == st.st_rdev
	#endif
		&& st1.st_ino == st.st_ino
		&& st1.st_dev == st.st_dev)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160806/3cb0717f/attachment.sig>


More information about the Libc-alpha mailing list