Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/aiomixer aiomixer: Fix sorting of ac97 controls
details: https://anonhg.NetBSD.org/src/rev/141d59f2ed04
branches: trunk
changeset: 379072:141d59f2ed04
user: nia <nia%NetBSD.org@localhost>
date: Sat May 08 12:53:15 2021 +0000
description:
aiomixer: Fix sorting of ac97 controls
diffstat:
usr.bin/aiomixer/parse.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 26456b96d5e5 -r 141d59f2ed04 usr.bin/aiomixer/parse.c
--- a/usr.bin/aiomixer/parse.c Sat May 08 12:45:04 2021 +0000
+++ b/usr.bin/aiomixer/parse.c Sat May 08 12:53:15 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.1 2021/05/07 16:29:24 nia Exp $ */
+/* $NetBSD: parse.c,v 1.2 2021/05/08 12:53:15 nia Exp $ */
/*-
* Copyright (c) 2021 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -56,14 +56,16 @@ compare_control(const void *pa, const vo
const struct aiomixer_control *a = (const struct aiomixer_control *)pa;
const struct aiomixer_control *b = (const struct aiomixer_control *)pb;
- if (a->info.prev != AUDIO_MIXER_LAST &&
+ if (a->info.prev != AUDIO_MIXER_LAST ||
b->info.prev != AUDIO_MIXER_LAST) {
if (b->info.prev == a->info.index)
return -1;
if (a->info.prev == b->info.index)
return 1;
+ } else {
+ return strcmp(a->info.label.name, b->info.label.name);
}
- return strcmp(a->info.label.name, b->info.label.name);
+ return 0;
}
int
Home |
Main Index |
Thread Index |
Old Index