[BACK]Return to siofile.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / sndiod

Diff for /src/usr.bin/sndiod/siofile.c between version 1.21 and 1.22

version 1.21, 2020/06/18 05:11:13 version 1.22, 2020/06/28 05:21:39
Line 96 
Line 96 
         struct dev_alt *n;          struct dev_alt *n;
         struct sio_hdl *hdl;          struct sio_hdl *hdl;
         struct sioctl_hdl *ctlhdl;          struct sioctl_hdl *ctlhdl;
           struct ctl *c;
           int val;
   
         for (n = d->alt_list; n != NULL; n = n->next) {          for (n = d->alt_list; n != NULL; n = n->next) {
                 if (d->alt_num == n->idx)                  if (d->alt_num == n->idx)
Line 117 
Line 119 
                                 }                                  }
                         }                          }
                         d->alt_num = n->idx;                          d->alt_num = n->idx;
                           for (c = d->ctl_list; c != NULL; c = c->next) {
                                   if (c->addr < CTLADDR_ALT_SEL ||
                                       c->addr >= CTLADDR_ALT_SEL + DEV_NMAX)
                                           continue;
                                   val = (c->addr - CTLADDR_ALT_SEL) == n->idx;
                                   if (c->curval == val)
                                           continue;
                                   c->curval = val;
                                   if (val)
                                           c->val_mask = ~0U;
                           }
                         *rctlhdl = ctlhdl;                          *rctlhdl = ctlhdl;
                         return hdl;                          return hdl;
                 }                  }

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22