changeset 30:8d3803d8818a

fixed ch's type ('\n' was implicitly casted to an int and compared with ch, which had only one byte of initialized content)
author mortenp
date Fri, 23 Apr 2004 09:57:53 +1000
parents f13d7b715cd6
children 8ab396d2684f
files src/mygetline.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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) {