artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c24253
)
Use a char, not a char[1] in ttgetc and cast the return value to int.
author
millert
<millert@openbsd.org>
Thu, 2 Mar 2000 17:01:41 +0000
(17:01 +0000)
committer
millert
<millert@openbsd.org>
Thu, 2 Mar 2000 17:01:41 +0000
(17:01 +0000)
Perhaps this should really be a u_char but I don't think it really matters.
usr.bin/mg/ttyio.c
patch
|
blob
|
history
diff --git
a/usr.bin/mg/ttyio.c
b/usr.bin/mg/ttyio.c
index
166e9a8
..
31bc386
100644
(file)
--- a/
usr.bin/mg/ttyio.c
+++ b/
usr.bin/mg/ttyio.c
@@
-159,11
+159,11
@@
ttflush()
int
ttgetc()
{
- char
buf[1]
;
+ char
c
;
- while (read(0, &
buf[0]
, 1) != 1)
+ while (read(0, &
c
, 1) != 1)
;
- return (
buf[0] & 0xFF
);
+ return (
(int) c
);
}
/*