[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/6] libshouldbeinlibc: fix dead assignment
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 4/6] libshouldbeinlibc: fix dead assignment |
Date: |
Sat, 16 Nov 2013 11:21:02 +0100 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Sat 16 Nov 2013 10:58:17 +0100, a écrit :
> Found using the Clang Static Analyzer.
>
> * libshouldbeinlibc/timefmt.c (fmt_past_time): Fix dead assignment,
> normalize adjacent white space.
Ack.
> ---
> libshouldbeinlibc/timefmt.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libshouldbeinlibc/timefmt.c b/libshouldbeinlibc/timefmt.c
> index 7ce973b..a28f58b 100644
> --- a/libshouldbeinlibc/timefmt.c
> +++ b/libshouldbeinlibc/timefmt.c
> @@ -338,8 +338,8 @@ fmt_past_time (struct timeval *tv, struct timeval *now,
>
> end = stpcpy (end, *dfmt);
> end = stpcpy (end, *sep);
> - end = stpcpy (end, *fmt);
> -
> + stpcpy (end, *fmt);
> +
> used = strftime (buf, width + 1, whole_fmt, &tm);
> }
>
> --
> 1.7.10.4
>
--
Samuel
"I don't know why, but first C programs tend to look a lot worse than
first programs in any other language (maybe except for fortran, but then
I suspect all fortran programs look like `firsts')"
(By Olaf Kirch)
- Clang Static Analyzer reports & more fixes for the Hurd, Justus Winter, 2013/11/16
- [PATCH 1/6] libdiskfs: remove dead assignment, Justus Winter, 2013/11/16
- [PATCH 2/6] libdiskfs: fix error handling, Justus Winter, 2013/11/16
- [PATCH 4/6] libshouldbeinlibc: fix dead assignment, Justus Winter, 2013/11/16
- Re: [PATCH 4/6] libshouldbeinlibc: fix dead assignment,
Samuel Thibault <=
- [PATCH 3/6] ext2fs: fix error handling, Justus Winter, 2013/11/16
- [PATCH 6/6] mach-defpager: do not remove -Wall from CFLAGS, Justus Winter, 2013/11/16
- [PATCH 5/6] mach-defpager: fix the page offsets returned by pager_pages, Justus Winter, 2013/11/16
- Re: Clang Static Analyzer reports & more fixes for the Hurd, Samuel Thibault, 2013/11/16
- Re: Clang Static Analyzer reports & more fixes for the Hurd, Samuel Thibault, 2013/11/16
- Re: Clang Static Analyzer reports & more fixes for the Hurd, Marin Ramesa, 2013/11/16