From: Johannes Sixt Date: Thu, 06 Apr 2017 16:33:51 GMT Subject: Re: [PATCH v3 1/2] Fix nonnull errors reported by UBSAN with GCC 7. 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: > +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