# HG changeset patch # User mortenp # Date 1082678273 -36000 # Node ID 8d3803d8818a7f05e4d090027d90dae88ece247b # Parent f13d7b715cd66c363073d44d96ad8e6df4ab5827 fixed ch's type ('\n' was implicitly casted to an int and compared with ch, which had only one byte of initialized content) diff -r f13d7b715cd6 -r 8d3803d8818a src/mygetline.c --- a/src/mygetline.c Fri Apr 23 09:00:01 2004 +1000 +++ b/src/mygetline.c Fri Apr 23 09:57:53 2004 +1000 @@ -45,7 +45,7 @@ { size_t i = 0, buf_size = BUFSIZE; /* initial buffer size */ char *buf = malloc(buf_size); - int ch; + char ch; buf[0] = '\0'; while(read(fd, &ch, 1) > 0) {