Subject: PR/26860 CVS commit: src/usr.bin/sort
To: None <jdolecek@NetBSD.org, gnats-admin@netbsd.org,>
From: Jaromir Dolecek <jdolecek@netbsd.org>
List: netbsd-bugs
Date: 10/23/2006 19:40:07
The following reply was made to PR bin/26860; it has been noted by GNATS.

From: Jaromir Dolecek <jdolecek@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/26860 CVS commit: src/usr.bin/sort
Date: Mon, 23 Oct 2006 19:39:55 +0000 (UTC)

 Module Name:	src
 Committed By:	jdolecek
 Date:		Mon Oct 23 19:39:54 UTC 2006
 
 Modified Files:
 	src/usr.bin/sort: sort.c
 
 Log Message:
 replace access(2) + /dev/ prefix check with lstat(2) and S_ISCHR()/S_ISBLK()
 
 part of PR bin/26860 by Michael van Elst
 
 while here, put output file fopen() inside the code block of the
 only code path where it's actually needed, to make the logic more obvious;
 and in the "stdout" case, initialize toutpath to empty string rather
 then /dev/stdout, to make it clear /dev/stdout is not actually used
 
 
 To generate a diff of this commit:
 cvs rdiff -r1.42 -r1.43 src/usr.bin/sort/sort.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.