Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/usr.bin/audiocfg Pull up following revision(s) (requested...
details: https://anonhg.NetBSD.org/src/rev/98cbdc05ed07
branches: netbsd-9
changeset: 963044:98cbdc05ed07
user: martin <martin%NetBSD.org@localhost>
date: Sat Sep 28 07:25:53 2019 +0000
description:
Pull up following revision(s) (requested by isaki in ticket #258):
usr.bin/audiocfg/main.c: revision 1.9
Fix assertion of "audiocfg list <n>" when n is an illegal index.
diffstat:
usr.bin/audiocfg/main.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (23 lines):
diff -r 0e85fb0ad46e -r 98cbdc05ed07 usr.bin/audiocfg/main.c
--- a/usr.bin/audiocfg/main.c Sat Sep 28 07:24:29 2019 +0000
+++ b/usr.bin/audiocfg/main.c Sat Sep 28 07:25:53 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.8 2019/05/08 14:36:12 isaki Exp $ */
+/* $NetBSD: main.c,v 1.8.2.1 2019/09/28 07:25:53 martin Exp $ */
/*
* Copyright (c) 2010 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -164,7 +164,12 @@
if (errno)
usage(argv[0]);
/* NOTREACHED */
- print_audiodev(audiodev_get(i), i);
+ adev = audiodev_get(i);
+ if (adev == NULL) {
+ fprintf(stderr, "no such device\n");
+ return EXIT_FAILURE;
+ }
+ print_audiodev(adev, i);
} else if (strcmp(argv[1], "default") == 0 && argc == 3) {
if (*argv[2] < '0' || *argv[2] > '9')
usage(argv[0]);
Home |
Main Index |
Thread Index |
Old Index