mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-10-24 12:04:38 +00:00
Fix get_line_alloc()
Assigning the result of getc() to a char makes comparing it to EOF unreliable, at the very least. You're never too old to make newbie mistakes. Thanks to Sebastian Gottschall for spotting this.
This commit is contained in:
1 file changed
+1
-1
+1
-1
@@ -1041,7 +1041,7 @@ void free_real(const char *func, unsigned int line, void *ptr)
|
||||
EOF reached and we return zero. */
|
||||
int get_line_alloc(FILE *f, char **buffp, size_t *sizep)
|
||||
{
|
||||
char c;
|
||||
int c;
|
||||
size_t cnt = 0;
|
||||
char *buff = *buffp;
|
||||
|
||||
|
||||
Reference in new issue
Block a user