On 28/09/12 15:11, John Zavgren wrote:
Greetings:
I just posted the webrev images for two networking code bugs:
File Descriptor Leak:
http://cr.openjdk.java.net/~chegar/8000203/webrev.00/
(Jira bug ID number: 8000203)
Looks good.
Uninitialized memory:
http://cr.openjdk.java.net/~chegar/8000206/webrev.00/
(Jira bug ID: 8000206)
This change doesn't actually fix a bug... the original code initialized "optlen" before it was referenced,
however, parfait (static code analysis) believes "optlen" MAY be used before initialization. I added the
assignment statement to "spoof" parfait, and it no longer flags a bug. I assume it's better to put minor
harmless tweaks in our code than to add state information to parfait, that would cause it to ignore certain
"situations". That option seems complicated and dangerous.
I think you can remove the subsequent redundant 'optlen =
sizeof(optval.i);' from this function. Otherwise, looks fine.
-Chris.
Thanks!
John Zavgren
john.zavg...@oracle.com