[restore_emitter] squash a strncpy warning

This commit is contained in:
Joe Thornber 2018-06-13 12:50:48 +01:00
parent af785461e9
commit b6ba3a070d

View File

@ -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);