[systemd-devel] [PATCH 1/2] namespace:Unchecked return value from library
Susant Sahani
susant at redhat.com
Mon Nov 17 02:23:09 PST 2014
On 11/17/2014 03:35 PM, David Herrmann wrote:
> Hi
Hi,
>
> On Tue, Nov 11, 2014 at 11:33 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)
>> @@ -289,7 +314,12 @@ static int mount_kdbus(BindMount *m) {
>> }
>>
>> root = strappenda(temporary_mount, "/kdbus");
>> - mkdir(root, 0755);
>> + r = mkdir(root, 0755);
>> + if (r < 0) {
>> + r = -errno;
>> + goto fail;
>> + }
>> +
>
> I also wonder whether we should check "errno != EEXIST". Haven't
> looked at it in detail, yet.
yes it's better. I'll modify it.
Susant
More information about the systemd-devel
mailing list