Re: [Qemu-devel] Query about BiteSizeTasks

2016-03-22 Thread Paolo Bonzini
On 22/03/2016 05:34, haris iqbal wrote: > Hello, > > One more thing I noticed was that there is no function prototype for > the function get_ticks_per_sec(). > > I was planning to use a script to change all the used of > get_ticks_per_sec() to NANOSECONDS_PER_SECOND with an exception of the > f

Re: [Qemu-devel] Query about BiteSizeTasks

2016-03-21 Thread haris iqbal
Hello, One more thing I noticed was that there is no function prototype for the function get_ticks_per_sec(). I was planning to use a script to change all the used of get_ticks_per_sec() to NANOSECONDS_PER_SECOND with an exception of the function definition itself in include/qemu/timer.h. SO want

Re: [Qemu-devel] Query about BiteSizeTasks

2016-03-21 Thread haris iqbal
On Mon, Mar 21, 2016 at 7:26 PM, Paolo Bonzini wrote: > > > On 21/03/2016 14:41, haris iqbal wrote: >> 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 sho

Re: [Qemu-devel] Query about BiteSizeTasks

2016-03-21 Thread Paolo Bonzini
On 21/03/2016 14:41, haris iqbal wrote: > 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. You're right, in the case of load

[Qemu-devel] Query about BiteSizeTasks

2016-03-21 Thread haris iqbal
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 va