This is a discussion on Re: prettify the code a bit within the mailing.openbsd.tech forums, part of the OpenBSD category; --> Jared Yanovich wrote: > Han Boetes <han@mijncomputer.nl> wrote: > > - if (fd == 0) > > + if ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Jared Yanovich wrote: > Han Boetes <han@mijncomputer.nl> wrote: > > - if (fd == 0) > > + if (fd == FILE_STDIO) > > I think you mean STDIN_FILENO. FILE_STDIO is used for something > else. I was following the logic of the rest of the file and 0 is used as FILE_STDIO: #define FILE_STDIO 0 #define FILE_MMAP 1 #define FILE_GZIP 2 That's why I choose it. But indeed, your suggestion makes more sense. # Han |