[PATCH] shrink last_char_is function even more
Bernd Petrovitsch
bernd at petrovitsch.priv.at
Wed Sep 2 12:32:31 UTC 2020
On 20/07/2020 05:46, Lauri Kasanen wrote:
> On Sun, 19 Jul 2020 22:31:09 +0200
> Tito <farmatito at tiscali.it> wrote:
>
>> please don't do this, this will bite us further up the road,
>> similarly as all string functions that save a check and break
>> havoc afterwards.
>
> The param should be marked with the nonnull attribute, just like the
> libc string functions. Then the compiler will warn you if you try to
> pass NULL (may need higher optimization, warning levels, or the
> analyzer mode in complex cases).
And it wants an assert()/assert()-like statement at the 1st line
of the function so that one can actually check the nonnull-ness
in test/debug/regression-test/... situations.
MfG,
Bernd
--
There is no cloud, just other people computers.
-- https://static.fsf.org/nosvn/stickers/thereisnocloud.svg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pEpkey.asc
Type: application/pgp-keys
Size: 3110 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20200902/86c8971f/attachment.key>
More information about the busybox
mailing list