Re: [PATCH v4 1/6] kunit: Introduce _NULL and _NOT_NULL macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 8, 2022 at 6:45 AM Ricardo Ribalda <ribalda@xxxxxxxxxxxx> wrote:
>
> Today, when we want to check if a pointer is NULL and not ERR we have
> two options:
>
> KUNIT_EXPECT_TRUE(test, ptr == NULL);
>
> or
>
> KUNIT_EXPECT_PTR_NE(test, ptr, (struct mystruct *)NULL);
>
> Create a new set of macros that take care of NULL checks.
>
> Reviewed-by: Daniel Latypov <dlatypov@xxxxxxxxxx>
> Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>

Reviewed-by: Brendan Higgins <brendanhiggins@xxxxxxxxxx>



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux