Author: mav Date: Fri Jan 27 09:15:55 2012 New Revision: 230611 URL: http://svn.freebsd.org/changeset/base/230611
Log: Return proper error message if recording device is not specified. MFC after: 1 week Modified: head/usr.sbin/mixer/mixer.c Modified: head/usr.sbin/mixer/mixer.c ============================================================================== --- head/usr.sbin/mixer/mixer.c Fri Jan 27 08:58:58 2012 (r230610) +++ head/usr.sbin/mixer/mixer.c Fri Jan 27 09:15:55 2012 (r230611) @@ -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; _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"