[sheepdog] [PATCH] dog/farm/snap: fix incorrect conditional statement
Liu Yuan
namei.unix at gmail.com
Mon Apr 21 11:03:08 CEST 2014
On Mon, Apr 21, 2014 at 04:37:21PM +0800, Ruoyu wrote:
> Both sides of != is the same.
>
> Signed-off-by: Ruoyu <liangry at ucweb.com>
> ---
> dog/farm/snap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dog/farm/snap.c b/dog/farm/snap.c
> index df98a78..ff03047 100644
> --- a/dog/farm/snap.c
> +++ b/dog/farm/snap.c
> @@ -151,7 +151,7 @@ void *snap_log_read(int *out_nr)
> len = st.st_size - sizeof(hdr);
> buffer = xmalloc(len);
> ret = xpread(fd, buffer, len, sizeof(hdr));
> - if (len != len) {
> + if (ret != len) {
Good catch, applied thanks.
Thanks
Yuan
More information about the sheepdog
mailing list