nfs4: fixed two warnings.

* warnings about comparison between signed and unsigned integer expressions.
* the use of max_c() was superflous anyway as the result is only used for a comparison
with the left value.
This commit is contained in:
Jérôme Duval 2013-04-29 20:29:10 +02:00
parent 778d2528d6
commit 56efe80f85
2 changed files with 2 additions and 2 deletions

View File

@ -419,7 +419,7 @@ Inode::Write(OpenFileCookie* cookie, off_t pos, const void* _buffer,
if ((cookie->fMode & O_APPEND) != 0)
pos = fMaxFileSize;
uint64 fileSize = max_c((off_t)fMaxFileSize, pos + *_length);
uint64 fileSize = pos + *_length;
if (fileSize > fMaxFileSize) {
status_t result = file_cache_set_size(fFileCache, fileSize);
if (result != B_OK)

View File

@ -75,7 +75,7 @@ void
MetadataCache::GrowFile(size_t newSize)
{
MutexLocker _(fLock);
fStatCache.st_size = max_c(newSize, fStatCache.st_size);
fStatCache.st_size = max_c((off_t)newSize, fStatCache.st_size);
}