From: Andre Noll Date: Wed, 12 Sep 2007 09:23:54 +0000 (+0200) Subject: vss_init(): Use FOR_EACH_AUDIO_FORMAT() instead of open coding the loop. X-Git-Tag: v0.3.0~427 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=c02bbaa2467c19180d360d6914a13d17e323185c;p=paraslash.git vss_init(): Use FOR_EACH_AUDIO_FORMAT() instead of open coding the loop. Fixes a segfault on startup in case not all three audio formats are supported. --- diff --git a/vss.c b/vss.c index 3ef850c7..a6d3dfc0 100644 --- a/vss.c +++ b/vss.c @@ -173,7 +173,7 @@ void vss_init(void) PARA_DEBUG_LOG("supported audio formats: %s\n", SUPPORTED_AUDIO_FORMATS); - for (i = 0; afl[i].name; i++) { + FOR_EACH_AUDIO_FORMAT(i) { PARA_NOTICE_LOG("initializing %s handler\n", afl[i].name); afl[i].init(&afl[i]);