s3:torture: Fix building with -O3 and gcc 7
authorAndreas Schneider <asn@samba.org>
Thu, 23 Nov 2017 16:10:42 +0000 (17:10 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 24 Nov 2017 00:13:14 +0000 (01:13 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/torture/torture.c

index f3da67c95dcf5b7a4028b0c14cbe05af264b48f1..5a29f7969ad52db5fe60ec5a4e6b85ea5beba125 100644 (file)
@@ -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 "