nfs4: Take advantage of strlcpy()
This commit is contained in:
parent
4fa87bf152
commit
55ca54ccf5
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user