On 01/05/2016 06:40 PM, Stefano Stabellini wrote:
On Tue, 5 Jan 2016, Cao jin wrote:
[...]

This is true, however I think that relying on it is error prone: in a
couple of years from now somebody might change the call sequence without
updating the error handling (easy to forget), causing QEMU to crash on
error. I think it is safer not to rely on errp != NULL.


I see, sounds reasonable


[...]

I think we only need to use a local Error variable when we want to check
for the returned error, in cases such as:

if (*errp) {

In other cases, when we are not interested in *errp, we can simply
propagate the error, like you have done in your patches.


Ok, will fix it

.


--
Yours Sincerely,

Cao Jin



Reply via email to