shadow_copy2: make shadow_copy2_find_snapdir() return const char *
authorMichael Adam <obnox@samba.org>
Tue, 28 May 2013 15:01:20 +0000 (17:01 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 13 Jan 2014 09:15:53 +0000 (10:15 +0100)
instead of char *. This eliminates compiler warnings.
snapdir is a const string in all occasions.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit e86923eb52633c5b6133c45678355ce69bb43a54)

source3/modules/vfs_shadow_copy2.c

index 952b010acf17aa6cf8d75617ba124ed10897a263..e227b1074e6d609f58f137471952be391229b0a3 100644 (file)
@@ -1036,12 +1036,12 @@ static char *have_snapdir(struct vfs_handle_struct *handle,
  * Find the snapshot directory (if any) for the given
  * filename (which is relative to the share).
  */
-static char *shadow_copy2_find_snapdir(TALLOC_CTX *mem_ctx,
-                                      struct vfs_handle_struct *handle,
-                                      struct smb_filename *smb_fname)
+static const char *shadow_copy2_find_snapdir(TALLOC_CTX *mem_ctx,
+                                            struct vfs_handle_struct *handle,
+                                            struct smb_filename *smb_fname)
 {
        char *path, *p;
-       char *snapdir;
+       const char *snapdir;
        struct shadow_copy2_config *config;
 
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct shadow_copy2_config,