From 209386bbd3177fbd310b36e2d8f09c6ba7f556d3 Mon Sep 17 00:00:00 2001 From: Garming Sam Date: Fri, 21 Feb 2014 09:06:25 +1300 Subject: [PATCH] s4: tidy up some null checks in ntvfs Change-Id: I629a299bea10b063de4525020a4c6b838260cd67 Signed-off-by: Garming Sam Reviewed-by: Andrew Bartlett Reviewed-by: Andreas Schneider Reviewed-by: Kamen Mazdrashki --- source4/ntvfs/cifs/vfs_cifs.c | 4 ++-- source4/ntvfs/smb2/vfs_smb2.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c index 16bbf970b49..0c887006901 100644 --- a/source4/ntvfs/cifs/vfs_cifs.c +++ b/source4/ntvfs/cifs/vfs_cifs.c @@ -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; } diff --git a/source4/ntvfs/smb2/vfs_smb2.c b/source4/ntvfs/smb2/vfs_smb2.c index bb9a235e326..705e5842ed7 100644 --- a/source4/ntvfs/smb2/vfs_smb2.c +++ b/source4/ntvfs/smb2/vfs_smb2.c @@ -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; } -- 2.11.4.GIT