summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cli_new.c4
-rw-r--r--src/common/unionfs.c13
2 files changed, 8 insertions, 9 deletions
diff --git a/src/cli_new.c b/src/cli_new.c
index b2d6e1d..bfd2d8c 100644
--- a/src/cli_new.c
+++ b/src/cli_new.c
@@ -929,7 +929,7 @@ boolean val_cmp(const valstruct *left, const valstruct *right, vtw_cond_e cond)
//don't bother comparing if these are different types.
if ((rcur || right->cnt)
- && right->val_types[rcur] != NULL) {
+ && right->val_types[rcur] != ERROR_TYPE) {
if (right->val_types[rcur] != val_type) {
continue;
}
@@ -957,7 +957,7 @@ boolean val_cmp(const valstruct *left, const valstruct *right, vtw_cond_e cond)
left_parts+5);
if ((rcur || right->cnt)
- && right->val_types[rcur] != NULL) {
+ && right->val_types[rcur] != ERROR_TYPE) {
format = cond_formats[right->val_types[rcur]];
}
(void) sscanf(rval, format, right_parts, right_parts+1,
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;
};