[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/5] libshouldbeinlibc: fix dead initialization in fmt_named_
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 2/5] libshouldbeinlibc: fix dead initialization in fmt_named_interval |
Date: |
Wed, 18 Jun 2014 00:34:01 +0200 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Mon 16 Jun 2014 19:49:26 +0200, a écrit :
> Found using the Clang Static Analyzer.
>
> * libshouldbeinlibc/timefmt.c (fmt_named_interval): Fix dead
> initialization.
Ack.
> ---
> libshouldbeinlibc/timefmt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libshouldbeinlibc/timefmt.c b/libshouldbeinlibc/timefmt.c
> index a28f58b..cef72e0 100644
> --- a/libshouldbeinlibc/timefmt.c
> +++ b/libshouldbeinlibc/timefmt.c
> @@ -105,7 +105,7 @@ fmt_named_interval (struct timeval *tv, size_t width,
> {{0, 1}, {0, 1}, {0, 0}, {" microsecond", "us", 0 }},
> {{0, 0} }
> };
> - struct tscale *ts = time_scales;
> + struct tscale *ts;
>
> if (width <= 0 || width >= buf_len)
> width = buf_len - 1;
> --
> 2.0.0
>
--
Samuel
As usual, this being a 1.3.x release, I haven't even compiled this
kernel yet. So if it works, you should be doubly impressed.
(Linus Torvalds, announcing kernel 1.3.3 on the linux-kernel mailing list.)
- [PATCH 1/5] ftpfs: fix error handling in refresh_dir, Justus Winter, 2014/06/16
- [PATCH 2/5] libshouldbeinlibc: fix dead initialization in fmt_named_interval, Justus Winter, 2014/06/16
- Re: [PATCH 2/5] libshouldbeinlibc: fix dead initialization in fmt_named_interval,
Samuel Thibault <=
- [PATCH 4/5] libports: avoid realloc(3) corner case, Justus Winter, 2014/06/16
- [PATCH 3/5] trans/fakeroot: fix error handling, Justus Winter, 2014/06/16
- [PATCH 5/5] libdiskfs: add permission check to file_chflags, Justus Winter, 2014/06/16
- Re: [PATCH 1/5] ftpfs: fix error handling in refresh_dir, Samuel Thibault, 2014/06/17