summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorratchov <ratchov@openbsd.org>2019-07-10 14:22:52 +0000
committerratchov <ratchov@openbsd.org>2019-07-10 14:22:52 +0000
commitcc2de1bab76ca371c20138ee1a7ca36110e6598c (patch)
treeb2cb87d07fc15f530b82819fa7bcf37c78c9f71b
parentUse NULL instead of 0 where a pointer is expected. (diff)
downloadwireguard-openbsd-cc2de1bab76ca371c20138ee1a7ca36110e6598c.tar.xz
wireguard-openbsd-cc2de1bab76ca371c20138ee1a7ca36110e6598c.zip
Slot name can't be empty. So, no need to check if it is empty.
-rw-r--r--usr.bin/sndiod/dev.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/sndiod/dev.c b/usr.bin/sndiod/dev.c
index 9c14ee270ac..1c8e7c77a06 100644
--- a/usr.bin/sndiod/dev.c
+++ b/usr.bin/sndiod/dev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev.c,v 1.49 2019/07/10 14:21:34 ratchov Exp $ */
+/* $OpenBSD: dev.c,v 1.50 2019/07/10 14:22:52 ratchov Exp $ */
/*
* Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org>
*
@@ -1607,8 +1607,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;