Commit 644dfbd7 authored by Allison Karlitskaya's avatar Allison Karlitskaya

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.
parent 5821b7f0
......@@ -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;
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment