diff options
author | 2019-07-10 14:22:52 +0000 | |
---|---|---|
committer | 2019-07-10 14:22:52 +0000 | |
commit | cc2de1bab76ca371c20138ee1a7ca36110e6598c (patch) | |
tree | b2cb87d07fc15f530b82819fa7bcf37c78c9f71b | |
parent | Use NULL instead of 0 where a pointer is expected. (diff) | |
download | wireguard-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.c | 5 |
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; |