diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2014-08-22 12:07:11 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2014-08-22 12:07:38 -0700 |
commit | 1505b379af16deab5b301b2f07f1d659ce2137cb (patch) | |
tree | 1440f36a221c904d2db821325cc07ae2fe9ecbbb /src/extent-scan.h | |
parent | 00d0c41d857a1c74169e43d1fba761cdd5279dba (diff) | |
download | coreutils-1505b379af16deab5b301b2f07f1d659ce2137cb.tar.xz |
maint: avoid int64_t and similar types unless they're needed
C11 doesn't require them, even POSIX doesn't strictly require the
64-bit versions, and it makes the code a bit clearer if they're
used only when needed.
* src/copy.c (write_zeros, extent_copy):
* src/extent-scan.h (struct extent_info.ext_length):
Use off_t, not uint64_t, for a value derived from a file offset.
* src/extent-scan.h (struct extent_info.ext_flags)
Prefer plain unsigned int to uint32_t where either will do.
(struct extent_scan.ei_count):
Use size_t, not uint32_t, for a value bounded by SIZE_MAX.
* src/factor.c (MAGIC64, MAGIC63, MAGIC65):
Remove unnecessary casts to uint64_t.
Diffstat (limited to 'src/extent-scan.h')
-rw-r--r-- | src/extent-scan.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/extent-scan.h b/src/extent-scan.h index fa8003434..73202a926 100644 --- a/src/extent-scan.h +++ b/src/extent-scan.h @@ -26,10 +26,10 @@ struct extent_info off_t ext_logical; /* Extent length. */ - uint64_t ext_length; + off_t ext_length; /* Extent flags, use it for FIEMAP only, or set it to zero. */ - uint32_t ext_flags; + unsigned int ext_flags; }; /* Structure used to reserve extent scan information per file. */ @@ -42,10 +42,10 @@ struct extent_scan off_t scan_start; /* Flags to use for scan. */ - uint32_t fm_flags; + unsigned int fm_flags; /* How many extent info returned for a scan. */ - uint32_t ei_count; + size_t ei_count; /* If true, fall back to a normal copy, either set by the failure of ioctl(2) for FIEMAP or lseek(2) with SEEK_DATA. */ |