bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH glibc] Add file record locking support


From: Samuel Thibault
Subject: Re: [PATCH glibc] Add file record locking support
Date: Tue, 20 Jan 2015 01:06:13 +0100
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Hello,

Svante Signell, le Thu 08 Jan 2015 19:54:12 +0100, a écrit :
> You made me confused, so all changes were not made. I think the malloc
> version was better for symmetry reasons. Changed anyway.

Which symmetry? You mean fl->foo vs fl.foo? It is not worth spending a
malloc call for this.

> +     if (cmd == F_GETLK)
> +       cmd = F_GETLK64;
> +     if (cmd == F_SETLK)
> +       cmd = F_SETLK64;
> +     if (cmd == F_SETLKW)
> +       cmd = F_SETLKW64;

Better use a switch () statement for that.

> +       default:
> +         errno = EINVAL;
>           return -1;
> +         break;

Do not add a break after a return, it is completely useless. Same below.

Apart from that it seems good.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]