diff options
Diffstat (limited to '')
-rw-r--r-- | src/database.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/database.c b/src/database.c index 0fc340c3b..6ed7a445d 100644 --- a/src/database.c +++ b/src/database.c @@ -232,7 +232,6 @@ int db_load(void) char *dbFile = db_get_file(); struct stat st; char buffer[100]; - int bufferSize = 100; int foundFsCharset = 0; int foundVersion = 0; @@ -246,7 +245,7 @@ int db_load(void) } /* get initial info */ - if (!myFgets(buffer, bufferSize, fp)) + if (!myFgets(buffer, sizeof(buffer), fp)) FATAL("Error reading db, fgets\n"); if (0 != strcmp(DIRECTORY_INFO_BEGIN, buffer)) { @@ -256,7 +255,7 @@ int db_load(void) return -1; } - while (myFgets(buffer, bufferSize, fp) && + while (myFgets(buffer, sizeof(buffer), fp) && 0 != strcmp(DIRECTORY_INFO_END, buffer)) { if (!prefixcmp(buffer, DIRECTORY_MPD_VERSION)) { if (foundVersion) |