Files
infnoise/software/writeentropy.c
Ross Williams 7ed7014e14 Change getc return type from char to int32_t
The return type of `getc(3)` is a signed integer,
with negative values indicating an error. The changed
line stored the return value in an *unsigned* integer,
then tested it against a negative error constant, so
the error condition would never be detected. This
also results in a warning on GCC 10.

Further information:
- [`getc(3)`](https://man7.org/linux/man-pages/man3/fgetc.3.html)
- [C FAQ question 12.1](http://c-faq.com/stdio/getcharc.html)
2022-01-26 21:09:21 -05:00

2.5 KiB