[systemd-devel] [PATCH 1/2] namespace:Unchecked return value from library

Susant Sahani susant at redhat.com
Mon Nov 17 02:55:07 PST 2014


On 11/17/2014 04:14 PM, David Herrmann wrote:
> Hi
>
> On Mon, Nov 17, 2014 at 11:37 AM, Susant Sahani <susant at redhat.com> wrote:
>> fix:
>>   CID 1237553 (#1 of 6): Unchecked return value from library
>> (CHECKED_RETURN
>>
>> CID 1237553 (#3 of 6): Unchecked return value from library
>> (CHECKED_RETURN)
>>
>> CID 1237553 (#4 of 6): Unchecked return value from library
>> (CHECKED_RETURN)
>>
>> CID 1237553 (#5 of 6): Unchecked return value from library
>> (CHECKED_RETURN
>>
>> CID 1237553 (#6 of 6): Unchecked return value from library
>> (CHECKED_RETURN)
>> ---
>
> Looking into mount_dev() more closely, I noticed this is probably not
> needed at all. I mean, we create a temporary directory and then mount
> everything in there. See mkdtemp(). If mkdir() fails, then mount()
> will fail too. No-one else can mess with us as they need to be root to
> do anything bad to our temp-dir (and if they're root, we're screwed
> anyway).
>
> So I guess we can just ignore all the errors. I'd be fine with
> pre-fixing them with "(void)", or dropping EEXIST again (sorry!) and
> doing normal error-checking.

Agreed !

Susant


More information about the systemd-devel mailing list