[SSSD] [PATCH] Unchecked return value in files.c

Michal Židek mzidek at redhat.com
Mon Jan 28 12:16:37 UTC 2013


On 01/28/2013 10:44 AM, Jakub Hrozek wrote:
> On Mon, Jan 28, 2013 at 10:37:19AM +0100, Pavel Březina wrote:
>> We should also test the return value of close() on the succeeding
>> lines. I wonder why Coverity didn't argue here.
>
> My guess is that we also don't check close() return value elsewhere. The
> way I've seen Coverity work is that if most other occurences are
> checked, then Coverity raises a flag is one is not.

Yes I though so too. That is also the reason, why I didn't check the 
return value of close here. If we want to check it, we must change it 
everywhere where close() is used (Otherwise Coverity will probably 
complain). Do we want to check close() return values? If so I can post 
another patch related to close() only that will check it everywhere, but 
I think it is not necessary.

New patch is attached.

Thanks
Michal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Unchecked-return-value-in-files.c.patch
Type: text/x-patch
Size: 1103 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20130128/ec96d618/attachment.bin>


More information about the sssd-devel mailing list