mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-03-10 00:00:04 +03:00
fix a (spurious) gcc warning
This commit is contained in:
parent
67fb317a07
commit
e288c9f1de
@ -196,7 +196,9 @@ struct bch_sb *bch2_format(struct format_opts opts,
|
|||||||
uuid_generate(sb.sb->uuid.b);
|
uuid_generate(sb.sb->uuid.b);
|
||||||
|
|
||||||
if (opts.label)
|
if (opts.label)
|
||||||
strncpy((char *) sb.sb->label, opts.label, sizeof(sb.sb->label));
|
memcpy(sb.sb->label,
|
||||||
|
opts.label,
|
||||||
|
min(strlen(opts.label), sizeof(sb.sb->label)));
|
||||||
|
|
||||||
SET_BCH_SB_CSUM_TYPE(sb.sb, opts.meta_csum_type);
|
SET_BCH_SB_CSUM_TYPE(sb.sb, opts.meta_csum_type);
|
||||||
SET_BCH_SB_META_CSUM_TYPE(sb.sb, opts.meta_csum_type);
|
SET_BCH_SB_META_CSUM_TYPE(sb.sb, opts.meta_csum_type);
|
||||||
|
Loading…
Reference in New Issue
Block a user