lkml.org 
[lkml]   [2008]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: sound/core.h: evil #ifdefs
From
Date
On Sat, 2008-03-29 at 21:57 +0100, Pavel Machek wrote:
> snd_minor_info_oss_* is an function returning int _or_ comment,
> depending on config parameters. That is truly evil, fix it.
>
> Signed-off-by: Pavel Machek <pavel@suse.cz>
>
> diff --git a/include/sound/core.h b/include/sound/core.h
> index 4fc0235..452000d 100644
> --- a/include/sound/core.h
> +++ b/include/sound/core.h
> @@ -277,8 +277,8 @@ #ifdef CONFIG_SND_OSSEMUL
> int snd_minor_info_oss_init(void);
> int snd_minor_info_oss_done(void);
> #else
> -#define snd_minor_info_oss_init() /*NOP*/
> -#define snd_minor_info_oss_done() /*NOP*/
> +static inline snd_minor_info_oss_init(void) { return 0; }
static inline int snd_minor_info_oss_init(void) { return 0; }

> +static inline snd_minor_info_oss_done(void) { return 0; }
static inline int snd_minor_info_oss_done(void) { return 0; }
> #endif
>
> /* memory.c */
>

Cheers,

Harvey



\
 
 \ /
  Last update: 2008-03-29 22:03    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog