[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35062: [PATCH v3 3/3] don't compare unsigned to less-than-zero
From: |
Eli Zaretskii |
Subject: |
bug#35062: [PATCH v3 3/3] don't compare unsigned to less-than-zero |
Date: |
Sat, 13 Apr 2019 11:11:02 +0300 |
> From: Konstantin Kharlamov <Hi-Angel@yandex.ru>
> Date: Sun, 7 Apr 2019 05:13:31 +0300
>
> * pdumper.c (dump_anonymous_allocate, dump_map_file): don't compare
> unsigned to less-than-zero (Bug#35062)
A minor nit: the text after the function names should start with a
capital letter ("Don't compare..."), as any English sentence would.
> ---
> v3: mention functions changed in commit messages, mention the bug
> number, and don't mention that it fixes a warning since intention of
> changes is clear either way.
It is true that these assertions may look redundant, but pdumper.c
uses an unusually high level of safety features, so I'd like to have a
second opinion from its author.
Daniel, are you okay with removing these assertions?
> src/pdumper.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/src/pdumper.c b/src/pdumper.c
> index a9b3732a2d4..5407154fb2d 100644
> --- a/src/pdumper.c
> +++ b/src/pdumper.c
> @@ -4434,7 +4434,6 @@ dump_anonymous_allocate (void *base,
> static void
> dump_anonymous_release (void *addr, size_t size)
> {
> - eassert (size >= 0);
> #if VM_SUPPORTED == VM_MS_WINDOWS
> (void) size;
> if (!VirtualFree (addr, 0, MEM_RELEASE))
> @@ -4584,7 +4583,6 @@ dump_map_file (void *base, int fd, off_t offset, size_t
> size,
> static void
> dump_unmap_file (void *addr, size_t size)
> {
> - eassert (size >= 0);
> #if !VM_SUPPORTED
> (void) addr;
> (void) size;
> --
> 2.21.0
- bug#35062: [PATCH v3 1/3] Remove redundant comparison, Konstantin Kharlamov, 2019/04/06
- bug#35062: [PATCH v3 3/3] don't compare unsigned to less-than-zero, Konstantin Kharlamov, 2019/04/06
- bug#35062: [PATCH v3 3/3] don't compare unsigned to less-than-zero,
Eli Zaretskii <=
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Konstantin Kharlamov, 2019/04/06
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Eli Zaretskii, 2019/04/13
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Paul Eggert, 2019/04/19
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Konstantin Kharlamov, 2019/04/19
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Konstantin Kharlamov, 2019/04/19
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Eli Zaretskii, 2019/04/20
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Konstantin Kharlamov, 2019/04/20
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Eli Zaretskii, 2019/04/20