Misc fixes for smfsh.c, no significant functional changes.