Slot name can't be empty. So, no need to check if it empty.

This commit is contained in:
Alexandre Ratchov 2019-07-10 10:41:18 +02:00
parent 505722ac5d
commit e21b26a56f
1 changed files with 1 additions and 2 deletions

View File

@ -1609,8 +1609,7 @@ slot_new(struct dev *d, struct opt *opt, char *who,
return NULL;
}
s = d->slot + bestidx;
if (s->name[0] != '\0')
s->vol = MIDI_MAXCTL;
s->vol = MIDI_MAXCTL;
strlcpy(s->name, name, SLOT_NAMEMAX);
s->serial = d->serial++;
s->unit = unit;