nfs4: Take advantage of strlcpy()

This commit is contained in:
Pawel Dziepak 2013-03-19 02:32:05 +01:00
parent 4fa87bf152
commit 55ca54ccf5

View File

@ -135,8 +135,7 @@ RootInode::_UpdateInfo(bool force)
|| fFileSystem->GetConfiguration().fEmulateNamedAttrs)
fInfoCache.flags |= B_FS_HAS_MIME | B_FS_HAS_ATTR;
strncpy(fInfoCache.volume_name, fName, sizeof(fInfoCache.volume_name));
fInfoCache.volume_name[sizeof(fInfoCache.volume_name) - 1] = '\0';
strlcpy(fInfoCache.volume_name, fName, sizeof(fInfoCache.volume_name));
fInfoCacheExpire = time(NULL) + MetadataCache::kExpirationTime;