[v2,2/2] Fix variable assignment.

Message ID 20190214193547.30783-3-msantana@redhat.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Minor changes to checkpatches |

Checks

Context Check Description
ci/Intel-compilation success Compilation OK

Commit Message

Michael Santana Feb. 14, 2019, 7:35 p.m. UTC
  Fix trivial bug. In sh shell, 'foo = 1' is not the same as
'foo=1'. Using 'foo = 1' makes the shell attempt to interpret foo
as a command, rather than a simple variable assignment.

Signed-off-by: Michael Santana <msantana@redhat.com>
Fixes: dafc04c15174 ("hash: fix out-of-bound write while freeing key slot")
---
v2:
  Nothing changed since v1.

 devtools/checkpatches.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Thomas Monjalon Feb. 28, 2019, 11:14 a.m. UTC | #1
Hi,

Few minor comments,

The title should start with "devtools:" and not end with dot.
One suggestion:
	devtools: fix result of svg include check

14/02/2019 20:35, Michael Santana:
> Fix trivial bug. In sh shell, 'foo = 1' is not the same as
> 'foo=1'. Using 'foo = 1' makes the shell attempt to interpret foo
> as a command, rather than a simple variable assignment.

Yes, good catch, thanks.

> Signed-off-by: Michael Santana <msantana@redhat.com>
> Fixes: dafc04c15174 ("hash: fix out-of-bound write while freeing key slot")

The reference should be:
Fixes: dafc04c15174 ("devtools: fix return of forbidden addition checks")
and it should be followed by:
Cc: stable@dpdk.org
in order to be backported.
  

Patch

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 9c2b0a28a..8852b9412 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -68,7 +68,7 @@  check_forbidden_additions() { # <patch>
 		-v RET_ON_FAIL=1 \
 		-v MESSAGE='Using explicit .svg extension instead of .*' \
 		-f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk \
-		"$1" || res = 1
+		"$1" || res=1
 
 	return $res
 }