[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH glibc] Add file record locking support
From: |
Svante Signell |
Subject: |
Re: [PATCH glibc] Add file record locking support |
Date: |
Tue, 20 Jan 2015 11:44:34 +0100 |
On Tue, 2015-01-20 at 01:06 +0100, Samuel Thibault wrote:
> 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.
Ok!
> > + 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.
Done.
> > + default:
> > + errno = EINVAL;
> > return -1;
> > + break;
>
> Do not add a break after a return, it is completely useless. Same below.
Done.
> Apart from that it seems good.
tks!
New patch attached (glibc is currently building)
fcntl.diff
Description: Text Data