qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 10/11] net/eth: Clean up local variable shadowing


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 10/11] net/eth: Clean up local variable shadowing
Date: Mon, 4 Sep 2023 14:57:04 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.0

On 1/9/23 09:07, Akihiko Odaki wrote:
On 2023/09/01 7:56, Philippe Mathieu-Daudé wrote:
Fix:

   net/eth.c:435:20: error: declaration shadows a local variable [-Werror,-Wshadow]
             size_t input_size = iov_size(pkt, pkt_frags);
                    ^
   net/eth.c:413:16: note: previous declaration is here
         size_t input_size = iov_size(pkt, pkt_frags);
                ^

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  net/eth.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/eth.c b/net/eth.c
index 649e66bb1f..cf030eed7b 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -432,7 +432,7 @@ _eth_get_rss_ex_src_addr(const struct iovec *pkt, int pkt_frags,
          }
          if (opthdr.type == IP6_OPT_HOME) {
-            size_t input_size = iov_size(pkt, pkt_frags);
+            input_size = iov_size(pkt, pkt_frags);

You can just remove this statement.

Clever eh, thanks!



reply via email to

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