vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, While reading the code for grep, looking for the explanation of unexpected behaviour I found the following improvement of readability (I think). Index: file.c ================================================== ================= RCS file: /cvs/src/usr.bin/grep/file.c,v retrieving revision 1.5 diff -u -w -p -r1.5 file.c --- file.c 29 Dec 2003 21:20:55 -0000 1.5 +++ file.c 1 Feb 2005 16:36:47 -0000 @@ -93,7 +93,7 @@ grep_fdopen(int fd, char *mode) { file_t *f; - if (fd == 0) + if (fd == FILE_STDIO) snprintf(fname, sizeof fname, "(standard input)"); else snprintf(fname, sizeof fname, "(fd %d)", fd); # Han |