Fix 'uninitialized variables' defects found by Coverity version 6.5.1:
Uninitialized scalar variable (UNINIT)
Using uninitialized value.
Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I4b5a3293e7d01436a82b6f7cea50b84c60660b3a
Reviewed-on: http://review.whamcloud.com/7821
Tested-by: Hudson
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
struct dt_key *key;
struct lu_fid fid;
int rc;
struct dt_key *key;
struct lu_fid fid;
int rc;
ENTRY;
lfsck->li_new_scanned = 0;
ENTRY;
lfsck->li_new_scanned = 0;
- rc = lseek(src_fd, hai->hai_extent.offset, SEEK_SET);
- if (rc < 0) {
- CT_ERROR(errno,
- "cannot seek for read to "LPU64" (len %jd) in '%s'",
- hai->hai_extent.offset, (intmax_t)src_st.st_size, src);
- rc = -errno;
- goto out;
- }
-
if (fstat(dst_fd, &dst_st) < 0) {
CT_ERROR(errno, "cannot stat '%s'", dst);
return -errno;
if (fstat(dst_fd, &dst_st) < 0) {
CT_ERROR(errno, "cannot stat '%s'", dst);
return -errno;
+ rc = lseek(src_fd, hai->hai_extent.offset, SEEK_SET);
+ if (rc < 0) {
+ CT_ERROR(errno,
+ "cannot seek for read to "LPU64" (len %jd) in '%s'",
+ hai->hai_extent.offset, (intmax_t)src_st.st_size, src);
+ rc = -errno;
+ goto out;
+ }
+
rc = lseek(dst_fd, hai->hai_extent.offset, SEEK_SET);
if (rc < 0) {
rc = -errno;
rc = lseek(dst_fd, hai->hai_extent.offset, SEEK_SET);
if (rc < 0) {
rc = -errno;
{
struct hsm_copyaction_private *hcp = NULL;
char src[PATH_MAX];
{
struct hsm_copyaction_private *hcp = NULL;
char src[PATH_MAX];
+ char dst[PATH_MAX] = "";
int rc;
int rcf = 0;
bool rename_needed = false;
int rc;
int rcf = 0;
bool rename_needed = false;