Remove an array idiom which both broke the GCC build (apparently Clang allows some things with variable-length arrays in "gnu99" mode which GCC does not) and wasn't right anyway (there was a typo which caused a read past end of buffer).
gboolean searching = TRUE;
// Iterate over both by-path image hashes
- const int hash_count = 2;
- const int hash_candidates[hash_count] = {IMAGES_HASH_PATH, IMAGES_HASH_PATH_REFONLY};
+ const int hash_candidates[] = {IMAGES_HASH_PATH, IMAGES_HASH_PATH_REFONLY};
int hash_idx;
- for (hash_idx = 0; searching && hash_idx < IMAGES_HASH_COUNT; hash_idx++)
+ for (hash_idx = 0; searching && hash_idx < G_N_ELEMENTS (hash_candidates); hash_idx++)
{
GHashTable *target = loaded_images_hashes [hash_candidates [hash_idx]];
GHashTableIter iter;