diff options
-rw-r--r-- | mendeleev.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/mendeleev.c b/mendeleev.c index 81127dd..f6db8ea 100644 --- a/mendeleev.c +++ b/mendeleev.c @@ -151,15 +151,9 @@ explode (const char *word) return NULL; while (*formula->tail) - { - formula_t *f = formula; - while (f) - { - if (*f->tail) - advance (f); - f = f->next; - } - } + for (formula_t * f = formula; f; f = f->next) + if (*f->tail) + advance (f); return formula; } |