summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-05-28 11:57:35 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-05-28 11:57:35 -0700
commit692ac7df1d9ab19712ca1256f4f84cf18d55169c (patch)
treea29052ab85810b469874e1098805ab44edff2537 /src
parente9646c434de70ca36708ad2565941fdfa16d3c94 (diff)
downloadvyatta-cfg-692ac7df1d9ab19712ca1256f4f84cf18d55169c.tar.gz
vyatta-cfg-692ac7df1d9ab19712ca1256f4f84cf18d55169c.zip
Fix compiler warnings about overriding const
Change retrieve_data and srcDst to use const. This fixes compiler warnings about violating const rules.
Diffstat (limited to 'src')
-rw-r--r--src/common/unionfs.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/common/unionfs.c b/src/common/unionfs.c
index 2f7cd70..2c4f0f4 100644
--- a/src/common/unionfs.c
+++ b/src/common/unionfs.c
@@ -53,9 +53,6 @@ sys_cp(const char *src_file, const char *dst_file)
}
void
-retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op);
-
-void
set_path(char *path, boolean config);
struct VyattaNode*
@@ -151,7 +148,8 @@ get_config_path(GNode *node)
*
**/
void
-retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op)
+retrieve_data(char* rel_data_path, GNode *node, const char* root,
+ NODE_OPERATION op)
{
boolean final_node = FALSE;
@@ -159,8 +157,9 @@ retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op)
return;
}
- char *tmp = root;//get_cdirp();
+ const char *tmp = root;//get_cdirp();
char full_data_path[sizeof(char)*MAX_LENGTH_DIR_PATH];
+
strcpy(full_data_path,tmp);
if (rel_data_path != NULL) {
strcat(full_data_path,rel_data_path);
@@ -800,8 +799,8 @@ common_commit_copy_to_live_config(GNode *node, boolean suppress_piecewise_copy,
//needed for iteration below
struct SrcDst {
- char *_src;
- char *_dst;
+ const char *_src;
+ const char *_dst;
boolean _test_mode;
};