Add missing braces to ct_copy_attr() in lhsmtool_posix.c so that we
don't return a stale errno on success.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ia8ab377d8fd00d94666b15713f4e749d1330854a
Reviewed-on: http://review.whamcloud.com/7462
Tested-by: Hudson
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
times[1].tv_usec = 0;
if (fchmod(dst_fd, st.st_mode) < 0 ||
fchown(dst_fd, st.st_uid, st.st_gid) < 0 ||
- futimes(dst_fd, times) < 0)
+ futimes(dst_fd, times) < 0) {
CT_ERROR("'%s' fchmod fchown or futimes failed (%s)\n", src,
strerror(errno));
return -errno;
+ }
+
return 0;
}