From 81654429d7e5549973641566debb9ca926a5e399 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Mon, 15 Sep 2003 10:55:58 +0000 Subject: [PATCH] Small optimizations git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@692 6ac86273-5f31-0410-b378-82cca8765d1b --- kernel/chario.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/chario.c b/kernel/chario.c index 3263e4a..12b2e19 100644 --- a/kernel/chario.c +++ b/kernel/chario.c @@ -241,7 +241,7 @@ STATIC int cooked_write_char(struct dhdr FAR **pdev, if (err < 0) return err; } - } while (--count > 0); + } while (--count != 0); return SUCCESS; } @@ -333,7 +333,7 @@ long cooked_read(struct dhdr FAR **pdev, size_t n, char FAR *bp) break; *bp++ = c; xfer++; - if (bp[-1] == CTL_Z) + if ((unsigned char)c == CTL_Z) break; } return xfer;