[dpdk-dev,2/4] virtio-net.c: incorrect parens around equality check

Message ID 1405914461-19335-3-git-send-email-mhall@mhcomputing.net (mailing list archive)
State Rejected, archived
Headers

Commit Message

Matthew Hall July 21, 2014, 3:47 a.m. UTC
  Signed-off-by: Matthew Hall <mhall@mhcomputing.net>
---
 examples/vhost/virtio-net.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Thomas Monjalon July 22, 2014, 1:14 p.m. UTC | #1
Hi Matthew,

I think that patches 1, 3 and 4 need some rework but this one is valid
and has no relation with other ones in the serie. So it can be integrated now.

2014-07-20 20:47, Matthew Hall:
> --- a/examples/vhost/virtio-net.c
> +++ b/examples/vhost/virtio-net.c
> @@ -280,8 +280,8 @@ get_config_ll_entry(struct vhost_device_ctx ctx)
>  
>  	/* Loop through linked list until the device_fh is found. */
>  	while (ll_dev != NULL) {
> -		if ((ll_dev->dev.device_fh == ctx.fh))
> -            return ll_dev;
> +		if (ll_dev->dev.device_fh == ctx.fh)
> +			return ll_dev;
>  		ll_dev = ll_dev->next;
>  	}

Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Applied for version 1.7.1.

Thanks
  
Matthew Hall July 22, 2014, 7:27 p.m. UTC | #2
On Tue, Jul 22, 2014 at 03:14:51PM +0200, Thomas Monjalon wrote:
> Hi Matthew,
> 
> I think that patches 1, 3 and 4 need some rework but this one is valid
> and has no relation with other ones in the serie. So it can be integrated now.

Great thanks!

I'll work a bit more on the others when I've got time.

Discovered them during a weekend Open Source project.

Matthew.
  

Patch

diff --git a/examples/vhost/virtio-net.c b/examples/vhost/virtio-net.c
index 801607a..5e659c7 100644
--- a/examples/vhost/virtio-net.c
+++ b/examples/vhost/virtio-net.c
@@ -280,8 +280,8 @@  get_config_ll_entry(struct vhost_device_ctx ctx)
 
 	/* Loop through linked list until the device_fh is found. */
 	while (ll_dev != NULL) {
-		if ((ll_dev->dev.device_fh == ctx.fh))
-            return ll_dev;
+		if (ll_dev->dev.device_fh == ctx.fh)
+			return ll_dev;
 		ll_dev = ll_dev->next;
 	}