Message ID | 20240613211933.1169581-3-bodonnel@redhat.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | xfsprogs: coverity fixes | expand |
On Thu, Jun 13, 2024 at 04:09:16PM -0500, Bill O'Donnell wrote: > Ensure automatic struct ifake is properly initialized. > > Coverity-id: 1596600, 1596597 > > Signed-off-by: Bill O'Donnell <bodonnel@redhat.com> Looks good now, Reviewed-by: Darrick J. Wong <djwong@kernel.org> --D > --- > db/bmap_inflate.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/db/bmap_inflate.c b/db/bmap_inflate.c > index 33b0c954..219f9bbf 100644 > --- a/db/bmap_inflate.c > +++ b/db/bmap_inflate.c > @@ -340,7 +340,7 @@ build_new_datafork( > const struct xfs_bmbt_irec *irec, > xfs_extnum_t nextents) > { > - struct xbtree_ifakeroot ifake; > + struct xbtree_ifakeroot ifake = {}; > struct xfs_btree_cur *bmap_cur; > int error; > > @@ -394,7 +394,7 @@ estimate_size( > .leaf_slack = 1, > .node_slack = 1, > }; > - struct xbtree_ifakeroot ifake; > + struct xbtree_ifakeroot ifake = {}; > struct xfs_btree_cur *bmap_cur; > int error; > > -- > 2.45.2 > >
diff --git a/db/bmap_inflate.c b/db/bmap_inflate.c index 33b0c954..219f9bbf 100644 --- a/db/bmap_inflate.c +++ b/db/bmap_inflate.c @@ -340,7 +340,7 @@ build_new_datafork( const struct xfs_bmbt_irec *irec, xfs_extnum_t nextents) { - struct xbtree_ifakeroot ifake; + struct xbtree_ifakeroot ifake = {}; struct xfs_btree_cur *bmap_cur; int error; @@ -394,7 +394,7 @@ estimate_size( .leaf_slack = 1, .node_slack = 1, }; - struct xbtree_ifakeroot ifake; + struct xbtree_ifakeroot ifake = {}; struct xfs_btree_cur *bmap_cur; int error;
Ensure automatic struct ifake is properly initialized. Coverity-id: 1596600, 1596597 Signed-off-by: Bill O'Donnell <bodonnel@redhat.com> --- db/bmap_inflate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)