goto fail;
}
- if (lseek(fd, 0, SEEK_SET) == (off_t) -1) {
- log_error("Failed to seek on %s: %m", tmp);
- goto uncompressed;
- }
-
if (fstat(fd, &st) < 0) {
log_error("Failed to fstat coredump %s: %m", tmp);
goto fail;
}
+ if (lseek(fd, 0, SEEK_SET) == (off_t) -1) {
+ log_error("Failed to seek on %s: %m", tmp);
+ goto uncompressed;
+ }
+
#ifdef HAVE_XZ
/* If we will remove the coredump anyway, do not compress. */
if (maybe_remove_external_coredump(NULL, st.st_size) == 0