diff mbox

example: l3fwd: explicitly ignore rc from parse call

Message ID 1482185741-1431-1-git-send-email-bill.fischofer@linaro.org
State New
Headers show

Commit Message

Bill Fischofer Dec. 19, 2016, 10:15 p.m. UTC
odph_eth_addr_parse always returns RC == 0. Resolve Bug
https://bugs.linaro.org/show_bug.cgi?id=2780 by explicitly ignoring this.

Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

---
 example/l3fwd/odp_l3fwd_db.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.7.4

Comments

Maxim Uvarov March 16, 2017, 2 p.m. UTC | #1
On 12/20/16 01:15, Bill Fischofer wrote:
> odph_eth_addr_parse always returns RC == 0. Resolve Bug

> https://bugs.linaro.org/show_bug.cgi?id=2780 by explicitly ignoring this.

> 

> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

> ---

>  example/l3fwd/odp_l3fwd_db.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/example/l3fwd/odp_l3fwd_db.c b/example/l3fwd/odp_l3fwd_db.c

> index 082b2c2..a8c2ca8 100644

> --- a/example/l3fwd/odp_l3fwd_db.c

> +++ b/example/l3fwd/odp_l3fwd_db.c

> @@ -394,7 +394,7 @@ int create_fwd_db_entry(char *input, char **oif, uint8_t **dst_mac)

>  			*oif = entry->oif;

>  			break;

>  		case 2:

> -			odph_eth_addr_parse(&entry->dst_mac, token);

> +			(void)odph_eth_addr_parse(&entry->dst_mac, token);


if function always return 0 it looks not right to ignore it's return
code. Or function has to be void or we have to check return code and do
something.

Maxim.

>  			*dst_mac = entry->dst_mac.addr;

>  			break;

>  

>
diff mbox

Patch

diff --git a/example/l3fwd/odp_l3fwd_db.c b/example/l3fwd/odp_l3fwd_db.c
index 082b2c2..a8c2ca8 100644
--- a/example/l3fwd/odp_l3fwd_db.c
+++ b/example/l3fwd/odp_l3fwd_db.c
@@ -394,7 +394,7 @@  int create_fwd_db_entry(char *input, char **oif, uint8_t **dst_mac)
 			*oif = entry->oif;
 			break;
 		case 2:
-			odph_eth_addr_parse(&entry->dst_mac, token);
+			(void)odph_eth_addr_parse(&entry->dst_mac, token);
 			*dst_mac = entry->dst_mac.addr;
 			break;