mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fuse: Initialize total_len in fuse_retrieve()
@ 2010-09-30 20:06 Geert Uytterhoeven
  2010-10-04  8:53 ` [fuse-devel] " Miklos Szeredi
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2010-09-30 20:06 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: Andrew Morton, fuse-devel, Linux Kernel Development

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.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 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@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [fuse-devel] [PATCH] fuse: Initialize total_len in fuse_retrieve()
  2010-09-30 20:06 [PATCH] fuse: Initialize total_len in fuse_retrieve() Geert Uytterhoeven
@ 2010-10-04  8:53 ` Miklos Szeredi
  0 siblings, 0 replies; 2+ messages in thread
From: Miklos Szeredi @ 2010-10-04  8:53 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: mszeredi, fuse-devel, akpm, linux-kernel

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@linux-m68k.org>
> ---
>  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@linux-m68k.org
> 
> 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@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fuse-devel
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-04  8:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-30 20:06 [PATCH] fuse: Initialize total_len in fuse_retrieve() Geert Uytterhoeven
2010-10-04  8:53 ` [fuse-devel] " Miklos Szeredi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®