On Fri, Jun 16, 2017 at 9:44 AM, Christopher Li <sparse@xxxxxxxxxxx> wrote: > On Fri, Jun 16, 2017 at 5:33 AM, Dibyendu Majumdar > <mobile@xxxxxxxxxxxxxxx> wrote: >> Hi, >> >> I noticed that sparse_file() closes the file descriptor even when it >> is 0. Is this the intended behavior? > > I don't see a problem with it. The tokenize_stream() will keep reading > the file descriptor until it hit EOF. > > If the stander input (file descriptor 0) already hit EOF, there is not much > you can read from it any way. You might just as well close it. That being said, the more correct behavior is adding a test, only close it when it is not zero. It will have impact on if some one give the '-' twice to sparse. I will accept a patch like that. Chris -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html