* src/global.c (thanks_for_all_the_fish): Upon exit also free the
lists with functions and shortcuts.
* src/*.c: Several random whitespace and comment tweaks.
+ * src/global.c (replace_scs_for): Condense the function a bit.
2014-05-12 Benno Schulenberg <bensberg@justemail.net>
* src/text.c (do_spell): Provide startup feedback, as for the linter.
#endif
}
-/* Assign one menu's shortcuts to another function. */
+/* Assign one function's shortcuts to another function. */
void replace_scs_for(void (*oldfunc)(void), void (*newfunc)(void))
{
sc *s;
- if (sclist == NULL)
- return;
-
- for (s = sclist; s->next != NULL; s = s->next)
+ for (s = sclist; s != NULL; s = s->next)
if (s->scfunc == oldfunc) {
s->scfunc = newfunc;
}