Hello,

I saw a task which says to " Add checks for NULL return value to uses
of load_image_targphys,...". But what I saw in the codebase,
load_image_targphys() returns int. So why should it be checks for
NULL.

NULL check is for pointer which can also be changed to (void *)0.

Should the return value be checked for 0. But when I saw what the
function is doing, it basically is what lseek will return in
get_image_size() and lseek return (off_t)-1 if it fails.

-- 

With regards,

Md Haris Iqbal,
Placement Coordinator, MTech IT
NITK Surathkal,
Contact: +91 8861996962

Reply via email to