From owner-svn-src-stable-9@FreeBSD.ORG Sat Feb 4 15:42:08 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B2201065672; Sat, 4 Feb 2012 15:42:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 055278FC14; Sat, 4 Feb 2012 15:42:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q14Fg78O041375; Sat, 4 Feb 2012 15:42:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q14Fg7gh041373; Sat, 4 Feb 2012 15:42:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201202041542.q14Fg7gh041373@svn.freebsd.org> From: Alexander Motin Date: Sat, 4 Feb 2012 15:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230982 - stable/9/usr.sbin/mixer X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2012 15:42:08 -0000 Author: mav Date: Sat Feb 4 15:42:07 2012 New Revision: 230982 URL: http://svn.freebsd.org/changeset/base/230982 Log: MFC r230611: Return proper error message if recording device is not specified. Modified: stable/9/usr.sbin/mixer/mixer.c Directory Properties: stable/9/usr.sbin/mixer/ (props changed) Modified: stable/9/usr.sbin/mixer/mixer.c ============================================================================== --- stable/9/usr.sbin/mixer/mixer.c Sat Feb 4 15:00:26 2012 (r230981) +++ stable/9/usr.sbin/mixer/mixer.c Sat Feb 4 15:42:07 2012 (r230982) @@ -193,13 +193,18 @@ main(int argc, char *argv[]) argc--; argv++; continue; - } else if (argc > 1 && strcmp("rec", *argv + 1) == 0) { + } else if (strcmp("rec", *argv + 1) == 0) { if (**argv != '+' && **argv != '-' && **argv != '=' && **argv != '^') { warnx("unknown modifier: %c", **argv); dusage = 1; break; } + if (argc <= 1) { + warnx("no recording device specified"); + dusage = 1; + break; + } if ((dev = res_name(argv[1], recmask)) == -1) { warnx("unknown recording device: %s", argv[1]); dusage = 1;