diff mbox series

[ovs-dev,v2] fix a copy-paste typo

Message ID 2340231697689889@jjcwlhzhm4ck4unt.iva.yp-c.yandex.net
State Accepted
Headers show
Series [ovs-dev,v2] fix a copy-paste typo | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes fail github build: failed

Commit Message

Igor Zhukov Oct. 19, 2023, 4:31 a.m. UTC
Although this typo does not cause a real error.

Look at my test: https://gcc.godbolt.org/z/hdKc389vd

Signed-off-by: Igor Zhukov <fsb4000@yandex.ru>
---
 controller/ofctrl.c | 2 +-
 northd/northd.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Mark Michelson Oct. 20, 2023, 7:27 p.m. UTC | #1
Thank you Igor,

Acked-by: Mark Michelson <mmichels@redhat.com>

On 10/19/23 00:31, Igor Zhukov wrote:
> Although this typo does not cause a real error.
> 
> Look at my test: https://gcc.godbolt.org/z/hdKc389vd
> 
> Signed-off-by: Igor Zhukov <fsb4000@yandex.ru>
> ---
>   controller/ofctrl.c | 2 +-
>   northd/northd.c     | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/controller/ofctrl.c b/controller/ofctrl.c
> index a1676a788..63b0aa975 100644
> --- a/controller/ofctrl.c
> +++ b/controller/ofctrl.c
> @@ -2202,7 +2202,7 @@ ofctrl_meter_bands_alloc(const struct sbrec_meter *sb_meter,
>                            struct ovn_extend_table_info *entry,
>                            struct ovs_list *msgs)
>   {
> -    struct meter_band_entry *mb = mb = xzalloc(sizeof *mb);
> +    struct meter_band_entry *mb = xzalloc(sizeof *mb);
>       mb->n_bands = sb_meter->n_bands;
>       mb->bands = xcalloc(mb->n_bands, sizeof *mb->bands);
>       for (int i = 0; i < sb_meter->n_bands; i++) {
> diff --git a/northd/northd.c b/northd/northd.c
> index 916068d44..f8b046d83 100644
> --- a/northd/northd.c
> +++ b/northd/northd.c
> @@ -15765,7 +15765,7 @@ build_lrouter_nat_defrag_and_lb(struct ovn_datapath *od, struct hmap *lflows,
>           !lport_addresses_is_empty(&od->lb_force_snat_addrs);
>   
>       for (int i = 0; i < od->nbr->n_nat; i++) {
> -        const struct nbrec_nat *nat = nat = od->nbr->nat[i];
> +        const struct nbrec_nat *nat = od->nbr->nat[i];
>           struct eth_addr mac = eth_addr_broadcast;
>           bool is_v6, distributed_nat;
>           ovs_be32 mask;
Igor Zhukov Oct. 21, 2023, 4:32 a.m. UTC | #2
Sure, you are welcome.

> Thank you Igor,
> 
> Acked-by: Mark Michelson <mmichels@redhat.com>
> 
> On 10/19/23 00:31, Igor Zhukov wrote:
> 
>> Although this typo does not cause a real error.
>>
>> Look at my test: https://gcc.godbolt.org/z/hdKc389vd
>>
>> Signed-off-by: Igor Zhukov <fsb4000@yandex.ru>
>> ---
>> controller/ofctrl.c | 2 +-
>> northd/northd.c | 2 +-
>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/controller/ofctrl.c b/controller/ofctrl.c
>> index a1676a788..63b0aa975 100644
>> --- a/controller/ofctrl.c
>> +++ b/controller/ofctrl.c
>> @@ -2202,7 +2202,7 @@ ofctrl_meter_bands_alloc(const struct sbrec_meter *sb_meter,
>> struct ovn_extend_table_info *entry,
>> struct ovs_list *msgs)
>> {
>> - struct meter_band_entry *mb = mb = xzalloc(sizeof *mb);
>> + struct meter_band_entry *mb = xzalloc(sizeof *mb);
>> mb->n_bands = sb_meter->n_bands;
>> mb->bands = xcalloc(mb->n_bands, sizeof *mb->bands);
>> for (int i = 0; i < sb_meter->n_bands; i++) {
>> diff --git a/northd/northd.c b/northd/northd.c
>> index 916068d44..f8b046d83 100644
>> --- a/northd/northd.c
>> +++ b/northd/northd.c
>> @@ -15765,7 +15765,7 @@ build_lrouter_nat_defrag_and_lb(struct ovn_datapath *od, struct hmap *lflows,
>> !lport_addresses_is_empty(&od->lb_force_snat_addrs);
>>
>> for (int i = 0; i < od->nbr->n_nat; i++) {
>> - const struct nbrec_nat *nat = nat = od->nbr->nat[i];
>> + const struct nbrec_nat *nat = od->nbr->nat[i];
>> struct eth_addr mac = eth_addr_broadcast;
>> bool is_v6, distributed_nat;
>> ovs_be32 mask;
Mark Michelson Oct. 23, 2023, 7:55 p.m. UTC | #3
I pushed this change to main.

On 10/20/23 15:27, Mark Michelson wrote:
> Thank you Igor,
> 
> Acked-by: Mark Michelson <mmichels@redhat.com>
> 
> On 10/19/23 00:31, Igor Zhukov wrote:
>> Although this typo does not cause a real error.
>>
>> Look at my test: https://gcc.godbolt.org/z/hdKc389vd
>>
>> Signed-off-by: Igor Zhukov <fsb4000@yandex.ru>
>> ---
>>   controller/ofctrl.c | 2 +-
>>   northd/northd.c     | 2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/controller/ofctrl.c b/controller/ofctrl.c
>> index a1676a788..63b0aa975 100644
>> --- a/controller/ofctrl.c
>> +++ b/controller/ofctrl.c
>> @@ -2202,7 +2202,7 @@ ofctrl_meter_bands_alloc(const struct 
>> sbrec_meter *sb_meter,
>>                            struct ovn_extend_table_info *entry,
>>                            struct ovs_list *msgs)
>>   {
>> -    struct meter_band_entry *mb = mb = xzalloc(sizeof *mb);
>> +    struct meter_band_entry *mb = xzalloc(sizeof *mb);
>>       mb->n_bands = sb_meter->n_bands;
>>       mb->bands = xcalloc(mb->n_bands, sizeof *mb->bands);
>>       for (int i = 0; i < sb_meter->n_bands; i++) {
>> diff --git a/northd/northd.c b/northd/northd.c
>> index 916068d44..f8b046d83 100644
>> --- a/northd/northd.c
>> +++ b/northd/northd.c
>> @@ -15765,7 +15765,7 @@ build_lrouter_nat_defrag_and_lb(struct 
>> ovn_datapath *od, struct hmap *lflows,
>>           !lport_addresses_is_empty(&od->lb_force_snat_addrs);
>>       for (int i = 0; i < od->nbr->n_nat; i++) {
>> -        const struct nbrec_nat *nat = nat = od->nbr->nat[i];
>> +        const struct nbrec_nat *nat = od->nbr->nat[i];
>>           struct eth_addr mac = eth_addr_broadcast;
>>           bool is_v6, distributed_nat;
>>           ovs_be32 mask;
>
diff mbox series

Patch

diff --git a/controller/ofctrl.c b/controller/ofctrl.c
index a1676a788..63b0aa975 100644
--- a/controller/ofctrl.c
+++ b/controller/ofctrl.c
@@ -2202,7 +2202,7 @@  ofctrl_meter_bands_alloc(const struct sbrec_meter *sb_meter,
                          struct ovn_extend_table_info *entry,
                          struct ovs_list *msgs)
 {
-    struct meter_band_entry *mb = mb = xzalloc(sizeof *mb);
+    struct meter_band_entry *mb = xzalloc(sizeof *mb);
     mb->n_bands = sb_meter->n_bands;
     mb->bands = xcalloc(mb->n_bands, sizeof *mb->bands);
     for (int i = 0; i < sb_meter->n_bands; i++) {
diff --git a/northd/northd.c b/northd/northd.c
index 916068d44..f8b046d83 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -15765,7 +15765,7 @@  build_lrouter_nat_defrag_and_lb(struct ovn_datapath *od, struct hmap *lflows,
         !lport_addresses_is_empty(&od->lb_force_snat_addrs);
 
     for (int i = 0; i < od->nbr->n_nat; i++) {
-        const struct nbrec_nat *nat = nat = od->nbr->nat[i];
+        const struct nbrec_nat *nat = od->nbr->nat[i];
         struct eth_addr mac = eth_addr_broadcast;
         bool is_v6, distributed_nat;
         ovs_be32 mask;