From: Pavel Reichl Date: Thu, 30 May 2024 22:38:18 +0000 (+0200) Subject: xfs_db: Fix uninicialized error variable X-Git-Tag: v6.9.0~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3e126d559a17f522e892079f142f9a74a077deb;p=thirdparty%2Fxfsprogs-dev.git xfs_db: Fix uninicialized error variable To silence redhat's covscan checker: Error: UNINIT (CWE-457): [#def1] [important] xfsprogs-6.4.0/db/hash.c:308:2: var_decl: Declaring variable "error" without initializer. xfsprogs-6.4.0/db/hash.c:353:2: uninit_use: Using uninitialized value "error". Signed-off-by: Pavel Reichl Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- diff --git a/db/hash.c b/db/hash.c index 05a94f24..9b3fdea6 100644 --- a/db/hash.c +++ b/db/hash.c @@ -304,7 +304,7 @@ collide_xattrs( struct dup_table *tab = NULL; xfs_dahash_t old_hash; unsigned long i; - int error; + int error = 0; old_hash = libxfs_da_hashname((uint8_t *)name, namelen);