strange issue reading /dev/null

Gabor Kovesdan gabor at kovesdan.org
Thu Aug 7 16:28:58 UTC 2008


Sean C. Farley ha scritto:
> You are testing c which has not been set.  It works OK if you set c then
> do the test:
>
> +       c = fgetc(f);
>         if (c != EOF)
> -               printf("%c\n", fgetc(f));
> +               printf("%c\n", c);
Yes, you are right, this is what I meant, I'm just a bit disorganised....
Thanks!

Gábor


More information about the freebsd-hackers mailing list