diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2020-07-14 22:49:51 +1200 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2020-07-17 07:16:31 +0000 |
commit | 8e1d72b7132763705a84f34d7cba9e3952514f2e (patch) | |
tree | 4beb6ffe0b66d3c12adeca208b8689d4adc066a6 | |
parent | 5e4e18d0c0619fb407a12768caa8c7125ab30d42 (diff) | |
download | samba-8e1d72b7132763705a84f34d7cba9e3952514f2e.tar.gz |
s4/torture: fix compilation in smb2/multichannel
GCC 9.3.0 doesn't like a true array being compared to NULL.
[3628/3972] Compiling source4/torture/smb2/multichannel.c
../../source4/torture/smb2/multichannel.c:1077:7: error: comparison of array 'trees2' equal to a null pointer is always false [-Werror,-Wtautological-pointer-compare]
if (trees2 == NULL || trees2[i] == NULL) {
^~~~~~ ~~~~
../../source4/torture/smb2/multichannel.c:1284:7: error: comparison of array 'trees2' equal to a null pointer is always false [-Werror,-Wtautological-pointer-compare]
if (trees2 == NULL || trees2[i] == NULL) {
^~~~~~ ~~~~
../../source4/torture/smb2/multichannel.c:2337:7: error: comparison of array 'trees2' equal to a null pointer is always false [-Werror,-Wtautological-pointer-compare]
if (trees2 == NULL || trees2[i] == NULL) {
^~~~~~ ~~~~
3 errors generated.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Jul 17 07:16:31 UTC 2020 on sn-devel-184
-rw-r--r-- | source4/torture/smb2/multichannel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/torture/smb2/multichannel.c b/source4/torture/smb2/multichannel.c index 7ff1945c316..332ee50382e 100644 --- a/source4/torture/smb2/multichannel.c +++ b/source4/torture/smb2/multichannel.c @@ -1074,7 +1074,7 @@ done: smb2_deltree(tree1, BASEDIR); for (i = 0; i < ARRAY_SIZE(trees2); i++) { - if (trees2 == NULL || trees2[i] == NULL) { + if (trees2[i] == NULL) { continue; } TALLOC_FREE(trees2[i]); @@ -1281,7 +1281,7 @@ done: smb2_deltree(tree1, BASEDIR); for (i = 0; i < ARRAY_SIZE(trees2); i++) { - if (trees2 == NULL || trees2[i] == NULL) { + if (trees2[i] == NULL) { continue; } TALLOC_FREE(trees2[i]); @@ -2334,7 +2334,7 @@ done: smb2_deltree(tree1, BASEDIR); for (i = 0; i < ARRAY_SIZE(trees2); i++) { - if (trees2 == NULL || trees2[i] == NULL) { + if (trees2[i] == NULL) { continue; } TALLOC_FREE(trees2[i]); |