From dfea6b7cdd50ad14082b1848104d580b4380471b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 26 Feb 2009 22:10:58 +0100 Subject: mvp: fixed default device detection The check "open()!=0" is wrong, you have to write "open()>=0", because -1 means error, and 0 is a valid file handle. --- src/output/mvp_plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/output/mvp_plugin.c b/src/output/mvp_plugin.c index b9004029b..976a2c2b5 100644 --- a/src/output/mvp_plugin.c +++ b/src/output/mvp_plugin.c @@ -114,7 +114,7 @@ mvp_output_test_default_device(void) fd = open("/dev/adec_pcm", O_WRONLY); - if (fd) { + if (fd >= 0) { close(fd); return true; } -- cgit v1.2.3