]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: leave start at NULL, it's not used before being set to smbfname->basename
authorRalph Boehme <slow@samba.org>
Wed, 25 Mar 2020 06:45:43 +0000 (07:45 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 27 Mar 2020 01:06:29 +0000 (01:06 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/filename.c

index 32e5835e676d0934e4668ff2b5721e802a44749d..44ed4e44103e4293a4fa2217d7835de721994281 100644 (file)
@@ -437,14 +437,7 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
                      uint32_t ucf_flags)
 {
        struct smb_filename *smb_fname = NULL;
-
-       /*
-        * This looks strange. But we need "start" initialized to "" here but
-        * it can't be a const char *, so 'char *start = "";' does not work.
-        */
-       char cnull = '\0';
-       char *start = &cnull;
-
+       char *start = NULL;
        char *end;
        char *dirpath = NULL;
        char *stream = NULL;