Re: [PATCH v3 1/2] Fix nonnull errors reported by UBSAN with GCC 7.
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Apr 6, 2017, 16:33 UTC
- Message-ID
- <587b0cb9-bd66-ddf7-5cca-023df3470883@kdbg.org>
- In-Reply-To
- <8555c61f-2617-eec8-6dbe-87c79c6ca302@suse.cz>
Am 06.04.2017 um 17:42 schrieb Martin Liška:
Show 7 quoted lines
> +static inline void *sane_memmove(void *dest, const void *src, size_t n)
> +{
> + if (n > 0)
> + return memmove(dest, src, n);
> + else
> + return dest;
> +}Huh? memmove with n == 0 is well-defined. This wrapper is pointless.
-- Hannes