sndiod: Initialize dev->master_enabled earlier

This commit is contained in:
Alexandre Ratchov 2021-03-08 07:14:16 +01:00
parent f712cdb11b
commit d6a1624f29
1 changed files with 1 additions and 1 deletions

View File

@ -942,6 +942,7 @@ dev_new(char *path, struct aparams *par,
d->pstate = DEV_CFG;
d->slot_list = NULL;
d->master = MIDI_MAXCTL;
d->master_enabled = 0;
snprintf(d->name, CTL_NAMEMAX, "%u", d->num);
d->next = dev_list;
dev_list = d;
@ -1094,7 +1095,6 @@ dev_open(struct dev *d)
char name[CTL_NAMEMAX];
struct dev_alt *a;
d->master_enabled = 0;
d->mode = d->reqmode;
d->round = d->reqround;
d->bufsz = d->reqbufsz;