Merge pull request #1180 from jgarzik/sign-compare

Fix final sign comparison warnings
This commit is contained in:
Jeff Garzik
2012-05-08 13:50:27 -07:00
4 changed files with 11 additions and 11 deletions

View File

@@ -1860,7 +1860,7 @@ bool CheckDiskSpace(uint64 nAdditionalBytes)
FILE* OpenBlockFile(unsigned int nFile, unsigned int nBlockPos, const char* pszMode)
{
if (nFile == -1)
if ((nFile < 1) || (nFile == (unsigned int) -1))
return NULL;
FILE* file = fopen((GetDataDir() / strprintf("blk%04d.dat", nFile)).string().c_str(), pszMode);
if (!file)