s4: tidy up some null checks in ntvfs
authorGarming Sam <garming@catalyst.net.nz>
Thu, 20 Feb 2014 20:06:25 +0000 (09:06 +1300)
committerAndreas Schneider <asn@samba.org>
Mon, 24 Feb 2014 16:16:27 +0000 (17:16 +0100)
Change-Id: I629a299bea10b063de4525020a4c6b838260cd67
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
source4/ntvfs/cifs/vfs_cifs.c
source4/ntvfs/smb2/vfs_smb2.c

index 16bbf970b49f28ff48453ed4f22a6143b342c535..0c88700690181cbab1f18f75b191cecfd60da7f1 100644 (file)
@@ -326,12 +326,12 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs,
        p->ntvfs = ntvfs;
 
        ntvfs->ctx->fs_type = talloc_strdup(ntvfs->ctx, "NTFS");
-       if (!ntvfs->ctx->fs_type) {
+       if (ntvfs->ctx->fs_type == NULL) {
                TALLOC_FREE(tmp_ctx);
                return NT_STATUS_NO_MEMORY;
        }
        ntvfs->ctx->dev_type = talloc_strdup(ntvfs->ctx, "A:");
-       if (!ntvfs->ctx->dev_type) {
+       if (ntvfs->ctx->dev_type == NULL) {
                TALLOC_FREE(tmp_ctx);
                return NT_STATUS_NO_MEMORY;
        }
index bb9a235e3260bdb587ed7d7c62ecd8c297d045ab..705e5842ed791a40bdb8348badaa2c4b2582b043 100644 (file)
@@ -285,12 +285,12 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs,
        p->ntvfs = ntvfs;
 
        ntvfs->ctx->fs_type = talloc_strdup(ntvfs->ctx, "NTFS");
-       if (!ntvfs->ctx->fs_type) {
+       if (ntvfs->ctx->fs_type == NULL) {
                TALLOC_FREE(tmp_ctx);
                return NT_STATUS_NO_MEMORY;
        }
        ntvfs->ctx->dev_type = talloc_strdup(ntvfs->ctx, "A:");
-       if (!ntvfs->ctx->dev_type) {
+       if (ntvfs->ctx->dev_type == NULL) {
                TALLOC_FREE(tmp_ctx);
                return NT_STATUS_NO_MEMORY;
        }