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

Re: [PATCH glibc] Add file record locking support



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 to: