torture: Fix the FreeBSD clang build
authorVolker Lendecke <vl@samba.org>
Wed, 4 Sep 2019 09:32:58 +0000 (11:32 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 4 Sep 2019 18:20:22 +0000 (18:20 +0000)
clang complained that "full_filename==NULL" is always false, because
it's a normal stack variable.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Sep  4 18:20:22 UTC 2019 on sn-devel-184

source4/torture/libsmbclient/libsmbclient.c

index 7bc407ac90523a4d9e71b29cedc2d510284c0192..b74d87aabed828c0b3b53d3b8f00c44309ef02a4 100644 (file)
@@ -421,7 +421,7 @@ static bool torture_libsmbclient_readdirplus_seek(struct torture_context *tctx)
                filename[i] = talloc_asprintf(tctx,
                                "test_readdirplus_%u.txt",
                                i);
-               if (full_filename == NULL) {
+               if (filename[i] == NULL) {
                        torture_fail_goto(tctx,
                                done,
                                "talloc fail\n");
@@ -430,7 +430,7 @@ static bool torture_libsmbclient_readdirplus_seek(struct torture_context *tctx)
                                "%s/%s",
                                dname,
                                filename[i]);
-               if (full_filename == NULL) {
+               if (full_filename[i] == NULL) {
                        torture_fail_goto(tctx,
                                done,
                                "talloc fail\n");