diff mbox

[-,aconnect,1/1] Fix aconnect printing card and pid on older kernels

Message ID 1459532101-6582-1-git-send-email-agoode@google.com (mailing list archive)
State New, archived
Headers show

Commit Message

Adam Goode April 1, 2016, 5:35 p.m. UTC
alsa-lib is changed to return a distinct negative value if running on
an older kernel. -1 is only returned now if the kernel knows for sure
that there is no card or pid. On older kernels, alsa-lib will return

Signed-off-by: Adam Goode <agoode@google.com>
diff mbox


diff --git a/seq/aconnect/aconnect.c b/seq/aconnect/aconnect.c
index 85a7770..bbc5bb3 100644
--- a/seq/aconnect/aconnect.c
+++ b/seq/aconnect/aconnect.c
@@ -177,13 +177,13 @@  static void print_port(snd_seq_t *seq, snd_seq_client_info_t *cinfo,
 		card = snd_seq_client_info_get_card(cinfo);
-		if (card != -1)
+		if (card >= 0)
 			printf(",card=%d", card);
 		pid = snd_seq_client_info_get_pid(cinfo);
-		if (pid != -1)
+		if (pid >= 0)
 			printf(",pid=%d", pid);