qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 10/26] vhost-user: split vhost_user_read()


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH v3 10/26] vhost-user: split vhost_user_read()
Date: Tue, 19 Jun 2018 08:23:23 +0200
User-agent: NeoMutt/20180512

> @@ -237,7 +251,7 @@ static int vhost_user_read(struct vhost_dev *dev, 
> VhostUserMsg *msg)
>          error_report("Failed to read msg header."
>                  " Size %d exceeds the maximum %zu.", msg->hdr.size,
>                  VHOST_USER_PAYLOAD_SIZE);
> -        goto fail;
> +        return -1;

Hmm?  Looks like a pointless indirection ...

>      }
>  
>      if (msg->hdr.size) {
> @@ -247,14 +261,11 @@ static int vhost_user_read(struct vhost_dev *dev, 
> VhostUserMsg *msg)
>          if (r != size) {
>              error_report("Failed to read msg payload."
>                           " Read %d instead of %d.", r, msg->hdr.size);
> -            goto fail;
> +            return -1;
>          }
>      }
>  
>      return 0;
> -
> -fail:
> -    return -1;

... if there is nothing to cleanup here.

cheers,
  Gerd




reply via email to

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