[MPlayer-cvslog] r33434 - trunk/libao2/ao_alsa.c

reimar subversion at mplayerhq.hu
Sat May 7 23:23:23 CEST 2011


Author: reimar
Date: Sat May  7 23:23:22 2011
New Revision: 33434

Log:
Simplify code and avoid an incorrect "may be used initialized"
gcc warning.

Modified:
   trunk/libao2/ao_alsa.c

Modified: trunk/libao2/ao_alsa.c
==============================================================================
--- trunk/libao2/ao_alsa.c	Sat May  7 23:15:13 2011	(r33433)
+++ trunk/libao2/ao_alsa.c	Sat May  7 23:23:22 2011	(r33434)
@@ -300,11 +300,10 @@ static int try_open_device(const char *d
     err = snd_pcm_open(&alsa_handler, ac3_device, SND_PCM_STREAM_PLAYBACK,
 		       open_mode);
     free(ac3_device);
+    if (err >= 0)
+      return err;
   }
-  if (!try_ac3 || err < 0)
-    err = snd_pcm_open(&alsa_handler, device, SND_PCM_STREAM_PLAYBACK,
-		       open_mode);
-  return err;
+  return snd_pcm_open(&alsa_handler, device, SND_PCM_STREAM_PLAYBACK, open_mode);
 }
 
 /*


More information about the MPlayer-cvslog mailing list