[PATCHv2] utils: check to_stdout return correctly in bond2team
diff mbox series

Message ID 54198f458e81100e0b0bad5c5b78ea577fff59cc.1532682467.git.lucien.xin@gmail.com
State New
Headers show
Series
  • [PATCHv2] utils: check to_stdout return correctly in bond2team
Related show

Commit Message

Xin Long July 27, 2018, 9:07 a.m. UTC
to_stdout is a function, not a string, so fix the check on
its return in bond2team.

v1->v2:
  improve the coding style as Flavio suggested.

Fixes: d5a1c8ee9e36 ("utils: add bond2team conversion tool")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
 utils/bond2team | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Flavio Leitner July 27, 2018, 11:17 a.m. UTC | #1
On Fri, Jul 27, 2018 at 05:07:47PM +0800, Xin Long wrote:
> to_stdout is a function, not a string, so fix the check on
> its return in bond2team.
> 
> v1->v2:
>   improve the coding style as Flavio suggested.
> 
> Fixes: d5a1c8ee9e36 ("utils: add bond2team conversion tool")
> Signed-off-by: Xin Long <lucien.xin@gmail.com>
> ---

Acked-by: Flavio Leitner <fbl@sysclose.org>
Jiri Pirko July 31, 2018, 10:16 a.m. UTC | #2
Fri, Jul 27, 2018 at 11:07:47AM CEST, lucien.xin@gmail.com wrote:
>to_stdout is a function, not a string, so fix the check on
>its return in bond2team.
>
>v1->v2:
>  improve the coding style as Flavio suggested.
>
>Fixes: d5a1c8ee9e36 ("utils: add bond2team conversion tool")
>Signed-off-by: Xin Long <lucien.xin@gmail.com>

applied, thanks!

Patch
diff mbox series

diff --git a/utils/bond2team b/utils/bond2team
index f8d46ef..fc81c4b 100755
--- a/utils/bond2team
+++ b/utils/bond2team
@@ -623,7 +623,7 @@  team_ifcfg_write()
 team_ifcfg_deliver()
 {
 	pr_dbg "${FUNCNAME} $*"
-	if [ ! to_stdout ]; then
+	if ! to_stdout; then
 		return 0
 	fi