WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Pointer should be checked before use

Yang, Xiaowei writes ("[Xen-devel] [PATCH] Pointer should be checked before 
use"):
> +    if ( domids == NULL || refs == NULL )
> +        return NULL;

Callers should not pass null pointers.  If they do it is better for
the program to explode sooner than later; that makes tracking the
fault much easier.

So this kind of check, turning incoming null pointers into error
returns, is a bad idea.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel