Skip to content

Commit 86516ef

Browse files
Eric Sandeendjwong
authored andcommitted
xfs: use memset to initialize xfs_scrub_agfl_info
Apparently different gcc versions have competing and incompatible notions of how to initialize at declaration, so just give up and fall back to the time-tested memset(). Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
1 parent 7928b2c commit 86516ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/xfs/scrub/agheader.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ int
767767
xfs_scrub_agfl(
768768
struct xfs_scrub_context *sc)
769769
{
770-
struct xfs_scrub_agfl_info sai = { 0 };
770+
struct xfs_scrub_agfl_info sai;
771771
struct xfs_agf *agf;
772772
xfs_agnumber_t agno;
773773
unsigned int agflcount;
@@ -795,6 +795,7 @@ xfs_scrub_agfl(
795795
xfs_scrub_block_set_corrupt(sc, sc->sa.agf_bp);
796796
goto out;
797797
}
798+
memset(&sai, 0, sizeof(sai));
798799
sai.sz_entries = agflcount;
799800
sai.entries = kmem_zalloc(sizeof(xfs_agblock_t) * agflcount, KM_NOFS);
800801
if (!sai.entries) {

0 commit comments

Comments
 (0)