From: Andreas Schneider Date: Thu, 23 Nov 2017 16:10:42 +0000 (+0100) Subject: s3:torture: Fix building with -O3 and gcc 7 X-Git-Tag: talloc-2.1.11~393 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=11c95b8c8dc8ba9db5b7a657ca1e77fac63b8cf0;p=thirdparty%2Fsamba.git s3:torture: Fix building with -O3 and gcc 7 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- diff --git a/source3/torture/torture.c b/source3/torture/torture.c index f3da67c95dc..5a29f7969ad 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -1478,7 +1478,8 @@ static bool tcon_devtest(struct cli_state *cli, if (NT_STATUS_IS_OK(expected_error)) { if (NT_STATUS_IS_OK(status)) { - if (strcmp(cli->dev, return_devtype) == 0) { + if (return_devtype != NULL && + strequal(cli->dev, return_devtype)) { ret = True; } else { printf("tconX to share %s with type %s "