|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] 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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |