From e21b26a56fbd783ea3076628a4f57ab99ebd50a7 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Wed, 10 Jul 2019 10:41:18 +0200 Subject: [PATCH] Slot name can't be empty. So, no need to check if it empty. --- sndiod/dev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sndiod/dev.c b/sndiod/dev.c index cd95395..7fc2b8e 100644 --- a/sndiod/dev.c +++ b/sndiod/dev.c @@ -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;