]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmb: Simplify SMBC_creat_ctx()
authorVolker Lendecke <vl@samba.org>
Fri, 25 Apr 2025 15:12:30 +0000 (17:12 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 15 May 2025 14:03:34 +0000 (14:03 +0000)
The same is also checked in SMBC_open_ctx()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/libsmb/libsmb_file.c

index 86767a4cf5b6c07ee52587e2c1c822c0f684f13b..c39e02fcb6a488a7c9632bbc515bb4800e1aff4e 100644 (file)
@@ -206,11 +206,6 @@ SMBC_creat_ctx(SMBCCTX *context,
                const char *path,
                mode_t mode)
 {
-       if (!context || !context->internal->initialized) {
-               errno = EINVAL;
-               return NULL;
-       }
-
        return SMBC_open_ctx(context, path,
                              O_WRONLY | O_CREAT | O_TRUNC, mode);
 }