diff options
-rw-r--r-- | usr.bin/sndiod/dev.c | 8 | ||||
-rw-r--r-- | usr.bin/sndiod/dev.h | 4 | ||||
-rw-r--r-- | usr.bin/sndiod/sock.c | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/usr.bin/sndiod/dev.c b/usr.bin/sndiod/dev.c index 07b85f7eb55..b476106c081 100644 --- a/usr.bin/sndiod/dev.c +++ b/usr.bin/sndiod/dev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev.c,v 1.86 2021/01/29 11:21:00 ratchov Exp $ */ +/* $OpenBSD: dev.c,v 1.87 2021/01/29 11:31:28 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org> * @@ -2319,13 +2319,13 @@ ctlslot_new(struct dev *d, struct ctlops *ops, void *arg) i++; } s->dev = d; - s->mask = 1 << i; + s->self = 1 << i; if (!dev_ref(d)) return NULL; s->ops = ops; s->arg = arg; for (c = d->ctl_list; c != NULL; c = c->next) - c->refs_mask |= s->mask; + c->refs_mask |= s->self; return s; } @@ -2339,7 +2339,7 @@ ctlslot_del(struct ctlslot *s) pc = &s->dev->ctl_list; while ((c = *pc) != NULL) { - c->refs_mask &= ~s->mask; + c->refs_mask &= ~s->self; if (c->refs_mask == 0) { *pc = c->next; xfree(c); diff --git a/usr.bin/sndiod/dev.h b/usr.bin/sndiod/dev.h index 35c4f34113c..baa5f88a24e 100644 --- a/usr.bin/sndiod/dev.h +++ b/usr.bin/sndiod/dev.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dev.h,v 1.34 2021/01/29 11:21:00 ratchov Exp $ */ +/* $OpenBSD: dev.h,v 1.35 2021/01/29 11:31:28 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org> * @@ -149,7 +149,7 @@ struct ctlslot { struct ctlops *ops; void *arg; struct dev *dev; - unsigned int mask; + unsigned int self; /* equal to (1 << index) */ unsigned int mode; }; diff --git a/usr.bin/sndiod/sock.c b/usr.bin/sndiod/sock.c index 9ed2e66edd6..ad1af1c743d 100644 --- a/usr.bin/sndiod/sock.c +++ b/usr.bin/sndiod/sock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sock.c,v 1.38 2021/01/29 10:55:19 ratchov Exp $ */ +/* $OpenBSD: sock.c,v 1.39 2021/01/29 11:31:28 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org> * @@ -1263,7 +1263,7 @@ sock_execmsg(struct sock *f) } if (m->u.ctlsub.desc) { if (!(f->ctlops & SOCK_CTLDESC)) { - ctl = f->ctlslot->mask; + ctl = f->ctlslot->self; c = f->ctlslot->dev->ctl_list; while (c != NULL) { c->desc_mask |= ctl; @@ -1550,7 +1550,7 @@ sock_buildmsg(struct sock *f) */ if (f->ctlslot && (f->ctlops & SOCK_CTLDESC)) { desc = f->ctldesc; - mask = f->ctlslot->mask; + mask = f->ctlslot->self; size = 0; pc = &f->ctlslot->dev->ctl_list; while ((c = *pc) != NULL) { @@ -1608,7 +1608,7 @@ sock_buildmsg(struct sock *f) } } if (f->ctlslot && (f->ctlops & SOCK_CTLVAL)) { - mask = f->ctlslot->mask; + mask = f->ctlslot->self; for (c = f->ctlslot->dev->ctl_list; c != NULL; c = c->next) { if ((c->val_mask & mask) == 0) continue; |