Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40475 )
Change subject: device: Add checks for NULL in device_const.c functions ......................................................................
Patch Set 2:
(1 comment)
Patch Set 2:
Shouldn't we use assertions instead? I can imagine any case where it would be valid call these functions with NULL.
Sure, I can add assert() or in fact die() since assert() might not be fatal.
https://review.coreboot.org/c/coreboot/+/40475/2/src/device/device_const.c File src/device/device_const.c:
https://review.coreboot.org/c/coreboot/+/40475/2/src/device/device_const.c@8... PS2, Line 89: if (!path1 || !path2)
This means that two NULL pointers will be considered not equal, is that behavior desired?
I returned 0 because path being NULL is not really a valid check for what this function is doing.