summaryrefslogtreecommitdiff
path: root/gdb/dictionary.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2010-05-14 00:23:26 +0000
committerMichael Snyder <msnyder@specifix.com>2010-05-14 00:23:26 +0000
commitcb5bd54a983a3b13537128a2f288ff13a4b36118 (patch)
treecde75646996404e232d09d91a24d93c0e2dfac31 /gdb/dictionary.c
parent17eee2f45635b901fb9696e16eb2b848034a0c57 (diff)
downloadgdb-cb5bd54a983a3b13537128a2f288ff13a4b36118.tar.gz
2010-05-13 Michael Snyder <msnyder@vmware.com>
* dictionary.c: Re-indent to GNU coding standard.
Diffstat (limited to 'gdb/dictionary.c')
-rw-r--r--gdb/dictionary.c46
1 files changed, 25 insertions, 21 deletions
diff --git a/gdb/dictionary.c b/gdb/dictionary.c
index e3617cfb900..e1c2010bc1c 100644
--- a/gdb/dictionary.c
+++ b/gdb/dictionary.c
@@ -724,21 +724,24 @@ expand_hashtable (struct dictionary *dict)
DICT_HASHED_NBUCKETS (dict) = new_nbuckets;
DICT_HASHED_BUCKETS (dict) = new_buckets;
- for (i = 0; i < old_nbuckets; ++i) {
- struct symbol *sym, *next_sym;
-
- sym = old_buckets[i];
- if (sym != NULL) {
- for (next_sym = sym->hash_next;
- next_sym != NULL;
- next_sym = sym->hash_next) {
- insert_symbol_hashed (dict, sym);
- sym = next_sym;
- }
-
- insert_symbol_hashed (dict, sym);
+ for (i = 0; i < old_nbuckets; ++i)
+ {
+ struct symbol *sym, *next_sym;
+
+ sym = old_buckets[i];
+ if (sym != NULL)
+ {
+ for (next_sym = sym->hash_next;
+ next_sym != NULL;
+ next_sym = sym->hash_next)
+ {
+ insert_symbol_hashed (dict, sym);
+ sym = next_sym;
+ }
+
+ insert_symbol_hashed (dict, sym);
+ }
}
- }
xfree (old_buckets);
}
@@ -821,13 +824,14 @@ add_symbol_linear_expandable (struct dictionary *dict,
int nsyms = ++DICT_LINEAR_NSYMS (dict);
/* Do we have enough room? If not, grow it. */
- if (nsyms > DICT_LINEAR_EXPANDABLE_CAPACITY (dict)) {
- DICT_LINEAR_EXPANDABLE_CAPACITY (dict) *= 2;
- DICT_LINEAR_SYMS (dict)
- = xrealloc (DICT_LINEAR_SYMS (dict),
- DICT_LINEAR_EXPANDABLE_CAPACITY (dict)
- * sizeof (struct symbol *));
- }
+ if (nsyms > DICT_LINEAR_EXPANDABLE_CAPACITY (dict))
+ {
+ DICT_LINEAR_EXPANDABLE_CAPACITY (dict) *= 2;
+ DICT_LINEAR_SYMS (dict)
+ = xrealloc (DICT_LINEAR_SYMS (dict),
+ DICT_LINEAR_EXPANDABLE_CAPACITY (dict)
+ * sizeof (struct symbol *));
+ }
DICT_LINEAR_SYM (dict, nsyms - 1) = sym;
}