27 lines
850 B
Diff
27 lines
850 B
Diff
|
From 0a8e8d581e5df6f1b13ea009fcdd77c6afcbdc43 Mon Sep 17 00:00:00 2001
|
||
|
From: Jaroslav Kysela <perex@perex.cz>
|
||
|
Date: Thu, 11 Sep 2008 13:39:42 +0200
|
||
|
Subject: [PATCH] alsactl: Fix oops (when parsing card argument)
|
||
|
|
||
|
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||
|
---
|
||
|
alsactl/alsactl.c | 2 +-
|
||
|
1 files changed, 1 insertions(+), 1 deletions(-)
|
||
|
|
||
|
diff --git a/alsactl/alsactl.c b/alsactl/alsactl.c
|
||
|
index 6728fbc..57957bf 100644
|
||
|
--- a/alsactl/alsactl.c
|
||
|
+++ b/alsactl/alsactl.c
|
||
|
@@ -150,7 +150,7 @@ int main(int argc, char *argv[])
|
||
|
}
|
||
|
|
||
|
cardname = argc - optind > 1 ? argv[optind + 1] : NULL;
|
||
|
- for (tmp = devfiles; cardname != NULL && tmp != NULL; tmp++) {
|
||
|
+ for (tmp = devfiles; cardname != NULL && *tmp != NULL; tmp++) {
|
||
|
int len = strlen(*tmp);
|
||
|
if (!strncmp(cardname, *tmp, len)) {
|
||
|
long l = strtol(cardname + len, NULL, 0);
|
||
|
--
|
||
|
1.6.0.GIT
|
||
|
|