Re: [fuse-devel] [PATCH] fuse: Initialize total_len in fuse_retrieve()

From: Miklos Szeredi
Date: Mon Oct 04 2010 - 04:53:43 EST


On Thu, 30 Sep 2010, Geert Uytterhoeven wrote:
> fs/fuse/dev.c:1357: warning: âtotal_lenâ may be used uninitialized in this
> function
>
> Initialize total_len to zero, else its value will be undefined.

Good catch, thanks. Pushed to for-next branch of fuse tree.

Thanks,
Miklos


>
> Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> ---
> fs/fuse/dev.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
> index d367af1..cde755c 100644
> --- a/fs/fuse/dev.c
> +++ b/fs/fuse/dev.c
> @@ -1354,7 +1354,7 @@ static int fuse_retrieve(struct fuse_conn *fc, struct inode *inode,
> loff_t file_size;
> unsigned int num;
> unsigned int offset;
> - size_t total_len;
> + size_t total_len = 0;
>
> req = fuse_get_req(fc);
> if (IS_ERR(req))
> --
> 1.7.0.4
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> fuse-devel mailing list
> fuse-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/fuse-devel
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/