GSettings: fix mixed use of a pointer

- used in some places as a move-along-as-we-go pointer
  - used in other places as a pointer to the fixed base of an array

Switch all users to the first style to avoid a crasher.
This commit is contained in:
Ryan Lortie 2010-05-02 14:14:30 -05:00
parent 5821b7f099
commit 644dfbd704

View File

@ -453,7 +453,6 @@ g_settings_backend_flatten_tree (GTree *tree,
{
FlattenState state = { 0, };
gsize nnodes;
gsize i;
nnodes = g_tree_nnodes (tree);
@ -470,8 +469,8 @@ g_settings_backend_flatten_tree (GTree *tree,
g_return_if_fail (*keys + nnodes == state.keys);
*path = state.prefix;
for (i = 0; i < nnodes; i++)
state.keys[i] += state.prefix_len;
while (nnodes--)
*--state.keys += state.prefix_len;
}
/**