[restore_emitter] squash a strncpy warning
This commit is contained in:
1 parent
af785461e9
commit
b6ba3a070d
1 file changed
+1
-1
@@ -26,7 +26,7 @@ namespace {
|
||||
|
||||
superblock &sb = md_->sb_;
|
||||
sb.version = metadata_version_;
|
||||
strncpy((char *) sb.policy_name, policy.c_str(), sizeof(sb.policy_name));
|
||||
strncpy((char *) sb.policy_name, policy.c_str(), sizeof(sb.policy_name) - 1);
|
||||
memset(sb.policy_version, 0, sizeof(sb.policy_version)); // FIXME: should come from xml
|
||||
sb.policy_hint_size = hint_width;
|
||||
md_->setup_hint_array(hint_width);
|
||||
|
||||
Reference in new issue
Block a user