[commit] py-prettyprint.c, val may be null

Michael Snyder msnyder@vmware.com
Tue Mar 1 21:41:00 GMT 2011


Pedro Alves wrote:
> On Tuesday 01 March 2011 21:04:49, Michael Snyder wrote:
>>   2011-03-01  Michael Snyder  <msnyder@vmware.com>
>>
>>         * python/py-prettyprint.c (apply_val_pretty_printer): VAL may
>>         be null.
> 
> How? 

Coverity assumes it may be null if it's checked for null.


> I think it could a while ago, but not anymore.  I've recently
> made sure val_print always gets a non-NULL value, and we'd now
> crash elsewhere otherwise.
> 

In that case, the later check for null is superfluous.
Is this better?


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: reversenull7.txt
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20110301/61ee7410/attachment.txt>


More information about the Gdb-patches mailing list