s4:ntvfs/posix/pvfs_resolve - Fix "discard const" warning
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Fri, 20 Nov 2009 10:56:16 +0000 (11:56 +0100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 3 Dec 2009 10:46:31 +0000 (21:46 +1100)
I removed two "const"s in front of string declarations to achieve this.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
source4/ntvfs/posix/pvfs_resolve.c
source4/ntvfs/posix/vfs_posix.h

index c01799e68cce3b7ed66f02930eac06def2a31efa..8f462648bd1362e64b23636e76ea458df2db494b 100644 (file)
@@ -696,7 +696,7 @@ NTSTATUS pvfs_resolve_name_handle(struct pvfs_state *pvfs,
 
        if (h->have_opendb_entry) {
                struct odb_lock *lck;
-               const char *name = NULL;
+               char *name = NULL;
 
                lck = odb_lock(h, h->pvfs->odb_context, &h->odb_locking_key);
                if (lck == NULL) {
@@ -707,7 +707,7 @@ NTSTATUS pvfs_resolve_name_handle(struct pvfs_state *pvfs,
                        return NT_STATUS_INTERNAL_DB_CORRUPTION;
                }
 
-               status = odb_get_path(lck, &name);
+               status = odb_get_path(lck, (const char **) &name);
                if (NT_STATUS_IS_OK(status)) {
                        /*
                         * This relies an the fact that
@@ -719,7 +719,7 @@ NTSTATUS pvfs_resolve_name_handle(struct pvfs_state *pvfs,
                        if (strcmp(h->name->full_name, name) != 0) {
                                const char *orig_dir;
                                const char *new_file;
-                               const char *new_orig;
+                               char *new_orig;
                                char *delim;
 
                                delim = strrchr(name, '/');
index b032ab3f931a9965ec232eae275513eb98a0e0d2..508dbb02dc80a0867faffde5da3f0ad48f33608a 100644 (file)
@@ -124,7 +124,7 @@ struct pvfs_dos_fileinfo {
   a filename passed by the client to any function
 */
 struct pvfs_filename {
-       const char *original_name;
+       char *original_name;
        char *full_name;
        const char *stream_name; /* does not include :$DATA suffix */
        uint32_t stream_id;      /* this uses a hash, so is probabilistic */