diff options
author | slioch <slioch@eng-140.vyatta.com> | 2009-07-06 17:31:50 -0700 |
---|---|---|
committer | slioch <slioch@eng-140.vyatta.com> | 2009-07-06 17:31:50 -0700 |
commit | 989e18d1c463dae8f7777532f57fcbd5bc386b62 (patch) | |
tree | de9a82e60e968b26a0a57fb334e5fb8f15438d8c | |
parent | 4172346d1cf2a76fb1b653863bde0e7466601e16 (diff) | |
download | vyatta-cfg-989e18d1c463dae8f7777532f57fcbd5bc386b62.tar.gz vyatta-cfg-989e18d1c463dae8f7777532f57fcbd5bc386b62.zip |
fix for ptr magic on 64 bit system. looks like double ptr was getting the missing the last 4 bytes on 64 bit copy.
-rw-r--r-- | src/commit2.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/commit2.c b/src/commit2.c index 5f70aa4..a324bab 100644 --- a/src/commit2.c +++ b/src/commit2.c @@ -943,7 +943,7 @@ validate_configuration(GNode *root_node, boolean mode, GSList **nodes_visited_co struct Result result; result._err_code = 0; result._mode = (int)mode; - result._data = (void*)nodes_visited_coll; + result._data = (void*)*nodes_visited_coll; //handles both syntax and commit result._action = syntax_act; @@ -963,7 +963,7 @@ validate_configuration(GNode *root_node, boolean mode, GSList **nodes_visited_co } GList **c_tmp = (GList**)result._data; - *nodes_visited_coll = (GSList*)*c_tmp; + *nodes_visited_coll = (GSList*)c_tmp; return TRUE; } @@ -985,8 +985,7 @@ validate_func(GNode *node, gpointer data) struct Result *result = (struct Result*)data; //since this visits all working nodes, let's maintain a set of nodes to commit - GList **c_tmp = (GList**)result->_data; - GList *coll = *c_tmp; + GList *coll = (GList*)result->_data; if (d->_path != NULL) { char *buf = malloc(MAX_LENGTH_DIR_PATH*sizeof(char)); if (IS_DELETE(d->_operation)) { @@ -996,7 +995,7 @@ validate_func(GNode *node, gpointer data) strcat(buf,val); } coll = g_slist_append(coll,buf); - result->_data = (void*)&coll; + result->_data = (void*)coll; } else if (IS_SET_OR_CREATE(d->_operation)) { sprintf(buf,"+ %s",d->_path); @@ -1005,7 +1004,7 @@ validate_func(GNode *node, gpointer data) strcat(buf,val); } coll = g_slist_append(coll,buf); - result->_data = (void*)&coll; + result->_data = (void*)coll; } } |