projects
/
apple
/
xnu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
xnu-1699.24.8.tar.gz
[apple/xnu.git]
/
bsd
/
kern
/
tty_subr.c
diff --git
a/bsd/kern/tty_subr.c
b/bsd/kern/tty_subr.c
index c2abc010d4b27efe015519b7ebab728970f56a2e..89bc09fe04fcaabf91e9eba0c871e84cce8ab8b4 100644
(file)
--- a/
bsd/kern/tty_subr.c
+++ b/
bsd/kern/tty_subr.c
@@
-340,7
+340,9
@@
clrbits(u_char *cp, int off, int len)
cp[sby++] &= mask;
mask = (1<<ebi) - 1;
- cp[eby] &= ~mask;
+ /* handle remainder bits, if any, for a non-0 ebi value */
+ if (mask)
+ cp[eby] &= ~mask;
for (i = sby; i < eby; i++)
cp[i] = 0x00;