Mercurial > hg > xmms-sid
changeset 453:60eedde4c44f
Cleanups
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 24 Jan 2007 21:58:05 +0000 |
parents | aec9f4beb401 |
children | 730b40033055 |
files | src/xs_stil.c |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xs_stil.c Wed Jan 24 21:57:04 2007 +0000 +++ b/src/xs_stil.c Wed Jan 24 21:58:05 2007 +0000 @@ -156,7 +156,7 @@ { FILE *inFile; gchar inLine[XS_BUF_SIZE + 16]; /* Since we add some chars here and there */ - guint lineNum, linePos, eolPos; + size_t lineNum; t_xs_stil_node *tmpNode; gboolean isError, isMulti; gint subEntry; @@ -176,8 +176,8 @@ tmpNode = NULL; subEntry = 0; - while (!feof(inFile) && !isError) { - fgets(inLine, XS_BUF_SIZE, inFile); + while (!isError && !feof(inFile) && fgets(inLine, XS_BUF_SIZE, inFile)) { + size_t linePos, eolPos; inLine[XS_BUF_SIZE - 1] = 0; linePos = eolPos = 0; xs_findeol(inLine, &eolPos); @@ -292,7 +292,7 @@ break; } - } /* while */ + } /* while */ /* Check if there is one remaining node */ if (tmpNode) @@ -535,6 +535,8 @@ } else tmpFilename = pcFilename; + XSDEBUG("xs_stil_get('%s') = '%s'\n", pcFilename, tmpFilename); + pResult = xs_stildb_get_node(xs_stildb_db, tmpFilename); } else pResult = NULL;