Re: initialize dl handles where it needs to

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Mon, 08 Jan 2007 14:37:45 +0100,
Benoit Fouet wrote:
> 
> Hi,
> 
> this trivial patch initializes dl handle in timer.c and timer_query.c
> where it needs to.
> 
> Signed-off-by: Benoit Fouet <benoit.fouet@xxxxxxxxxxxxxx>

I think the code really won't access the uninitialized h, but
initializing this variable is nice for code maintenance POV, anyway.

Applied to ALSA tree now.  Thanks.


Takashi

> 
> 
> [2 dl_handle_init_diff <text/plain (7bit)>]
> diff -r b838a4b481c2 src/timer/timer.c
> --- a/src/timer/timer.c Wed Dec 20 16:01:27 2006 +0100
> +++ b/src/timer/timer.c Mon Jan  8 14:22:29 2007 +0100
> @@ -92,7 +92,7 @@ static int snd_timer_open_conf(snd_timer
>  #ifndef PIC
>         extern void *snd_timer_open_symbols(void);
>  #endif
> -       void *h;
> +       void *h = NULL;
>         if (snd_config_get_type(timer_conf) != SND_CONFIG_TYPE_COMPOUND) {
>                 if (name)
>                         SNDERR("Invalid type for TIMER %s definition", name);
> diff -r b838a4b481c2 src/timer/timer_query.c
> --- a/src/timer/timer_query.c   Wed Dec 20 16:01:27 2006 +0100
> +++ b/src/timer/timer_query.c   Mon Jan  8 14:22:29 2007 +0100
> @@ -50,7 +50,7 @@ static int snd_timer_query_open_conf(snd
>  #ifndef PIC
>         extern void *snd_timer_query_open_symbols(void);
>  #endif
> -       void *h;
> +       void *h = NULL;
>         if (snd_config_get_type(timer_conf) != SND_CONFIG_TYPE_COMPOUND) {
>                 if (name)
>                         SNDERR("Invalid type for TIMER %s definition", name);
> [3  <text/plain; us-ascii (7bit)>]
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> [4  <text/plain; us-ascii (7bit)>]
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/alsa-devel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux