Rewrite read_scores() with suggestions from caf. Failing to open the scores file no longer leaks memory, and a malformed record no longer adds an empty link to the global scores list.

git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@253 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Tim Cava
2013-07-02 14:42:36 +00:00
parent 4ff0b8d2d5
commit ed1ad22d70
2 changed files with 19 additions and 36 deletions

View File

@@ -98,7 +98,7 @@ BUILT_IN_DLL(put_scores);
grec *init_acro(grec *);
void make_acro(grec *);
int valid_acro(grec *, char *);
srec *read_scores(void);
void read_scores(void);
int write_scores(srec *);
prec *take_acro(grec *, prec *, char *, char *, char *);
vrec *take_vote(grec *, vrec *, prec *, char *, char *, char *);