<p>You are completely correct in that regard, but checking if a pointer is null is a different concept. It's not as if the program tried to see if it actually contained a string.</p>
<div class="gmail_quote">On Feb 5, 2013 1:45 PM, "Arthur Mesh" <<a href="mailto:arthurmesh@gmail.com">arthurmesh@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Tue, Feb 05, 2013 at 01:41:30PM -0500, Brian Wilkins wrote:<br>
> It's a variable that points to null.<br>
<br>
Only if you initialize it. It's not initialized during declaration, hence its<br>
value is "garbage" from stack. It's only initialized conditionally later on.<br>
<br>
> this is a valid check to see if the<br>
> pointer is null. Coverity is showing a false positive.<br>
<br>
I don't see any evidence showing that it's guaranteed to be initialized<br>
before you read its value in:<br>
<br>
2113 � � if(errstr) {<br>
2114 � � � � s_log(LOG_ERR, "Service [%s]: %s", section->servname,<br>
2115 � � � � � � � errstr);<br>
2116 � � � � return 1;<br>
2117 � � }<br>
<br>
In any case. if you're convinced it's a false positive, so be it.<br>
</blockquote></div>