From 6c3539b476cd6df40c42ec54efcfb8baf4bf38bb Mon Sep 17 00:00:00 2001 From: jmg Date: Thu, 7 May 1998 14:13:16 +0000 Subject: [PATCH] fix a core dump problem when you don't give -f a parameter... also compare results of strcmp against 0 instead of !'ing results... Closes PR: 6538 --- usr.sbin/mixer/mixer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c index 5c0ffa6dc0f9..4c993b3e3f8d 100644 --- a/usr.sbin/mixer/mixer.c +++ b/usr.sbin/mixer/mixer.c @@ -13,7 +13,7 @@ #ifndef lint static const char rcsid[] = - "$Id: mixer.c,v 1.7 1997/09/29 06:38:49 charnier Exp $"; + "$Id: mixer.c,v 1.8 1997/10/01 06:34:09 charnier Exp $"; #endif /* not lint */ #include @@ -105,7 +105,7 @@ main(int argc, char *argv[]) else if (!strcmp(argv[0], "mixer3")) name = strdup("/dev/mixer2"); - if (argc > 1 && !strcmp(argv[1], "-f")) { + if (argc > 2 && strcmp(argv[1], "-f") == 0) { name = strdup(argv[2]); argc -= 2; argv += 2; }