summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--2/6.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/2/6.c b/2/6.c
index d311002..bf8cf2f 100644
--- a/2/6.c
+++ b/2/6.c
@@ -25,10 +25,10 @@ unsigned setbits(unsigned x, int p, int n, unsigned y) {
// align extracted bits to p:
yLOA = yLO << (p + 1 - n);
- // maks to unset n bits starting at p:
+ // mask to unset n bits starting at p:
xUnset = (~0 << p) | ~(~0 << (p - n));
- // mask out n bits in x from pth position:
+ // mask out x:
xPrime = x & xUnset;
return xPrime | yLOA;