qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Query about BiteSizeTasks
@ 2016-03-21 13:41 haris iqbal
  2016-03-21 13:56 ` Paolo Bonzini
  0 siblings, 1 reply; 5+ messages in thread
From: haris iqbal @ 2016-03-21 13:41 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-22  8:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-21 13:41 [Qemu-devel] Query about BiteSizeTasks haris iqbal
2016-03-21 13:56 ` Paolo Bonzini
2016-03-21 14:09   ` haris iqbal
2016-03-22  4:34     ` haris iqbal
2016-03-22  8:30       ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).