On Sun, May 29, 2016 at 06:52:41PM +0800, Qu Wenruo wrote: > >> + btrfs_set_super_leafsize(super, cfg->nodesize); > >> + btrfs_set_super_nodesize(super, cfg->nodesize); > >> + btrfs_set_super_stripesize(super, cfg->stripesize); > >> + btrfs_set_super_csum_type(super, BTRFS_CSUM_TYPE_CRC32); > >> + btrfs_set_super_chunk_root(super, chunk_bytenr); > >> + btrfs_set_super_cache_generation(super, -1); > >> + btrfs_set_super_incompat_flags(super, cfg->features); > >> + if (cfg->label) > >> + strncpy(super->label, cfg->label, BTRFS_LABEL_SIZE - 1); > > > > Why not use __strncpy_null? > > Good idea, I'll add new patch to use it.
I've updated it in the patch, there was one more that used strncpy and coverity reported it. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html