From: Christian Goeschel Ndjomouo Date: Thu, 9 Apr 2026 15:10:53 +0000 (-0400) Subject: style: (misc-utils/copyfilerange.c) fix indentation X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc5503432895dd2b73079e3d9f996e33e33fe472;p=thirdparty%2Futil-linux.git style: (misc-utils/copyfilerange.c) fix indentation Signed-off-by: Christian Goeschel Ndjomouo --- diff --git a/include/fileutils.h b/include/fileutils.h index d1b2ddf08..88e8b2114 100644 --- a/include/fileutils.h +++ b/include/fileutils.h @@ -74,7 +74,7 @@ static inline struct dirent *xreaddir(DIR *dp) while ((d = readdir(dp))) { if (!strcmp(d->d_name, ".") || - !strcmp(d->d_name, "..")) + !strcmp(d->d_name, "..")) continue; break; } @@ -96,7 +96,7 @@ static inline int close_range(unsigned int first, unsigned int last, int flags) # if !defined(HAVE_STATX) && defined(HAVE_STRUCT_STATX) && defined(SYS_statx) static inline int statx(int fd, const char *restrict path, int flags, - unsigned int mask, struct statx *stx) + unsigned int mask, struct statx *stx) { return syscall(SYS_statx, fd, path, flags, mask, stx); } @@ -134,7 +134,7 @@ static inline bool is_dotdir_dirent(const struct dirent *d) { return (d && d->d_name[0] == '.' && (d->d_name[1] == 0 - || (d->d_name[1] == '.' && d->d_name[2] == 0))); + || (d->d_name[1] == '.' && d->d_name[2] == 0))); } #endif /* UTIL_LINUX_FILEUTILS */ diff --git a/misc-utils/copyfilerange.c b/misc-utils/copyfilerange.c index 00c508fb5..a4baf60ce 100644 --- a/misc-utils/copyfilerange.c +++ b/misc-utils/copyfilerange.c @@ -71,8 +71,8 @@ static void __attribute__((__noreturn__)) usage(void) fputs(USAGE_ARGUMENTS, out); fputsln(_(" is of the form ::,\n" - " with all values in bytes. If is 0, as much data as available\n" - " is copied. When an offset is omitted, the last file position is used."), out); + " with all values in bytes. If is 0, as much data as available\n" + " is copied. When an offset is omitted, the last file position is used."), out); fprintf(out, USAGE_MAN_TAIL("copyfilerange(1)")); exit(EXIT_SUCCESS); @@ -135,23 +135,23 @@ static void copy_range(struct rangeitem *range) { if (range->in_offset > range->in_st_size) errx(EXIT_FAILURE, _("%s offset %jd is beyond file size of %jd"), - range->in_filename, (intmax_t) range->in_offset, (intmax_t) range->in_st_size); + range->in_filename, (intmax_t) range->in_offset, (intmax_t) range->in_st_size); while (remaining > 0) { const size_t chunk = remaining > SIZE_MAX ? SIZE_MAX : remaining; if (verbose) printf("copy_file_range %s to %s %jd:%jd:%zu\n", - range->in_filename, range->out_filename, - (intmax_t) range->in_offset, (intmax_t) range->out_offset, chunk); + range->in_filename, range->out_filename, + (intmax_t) range->in_offset, (intmax_t) range->out_offset, chunk); const ssize_t copied = copy_file_range(range->in_fd, &range->in_offset, - range->out_fd, &range->out_offset, chunk, 0); + range->out_fd, &range->out_offset, chunk, 0); if (copied < 0) errx(EXIT_FAILURE, _("failed to copy range %jd:%jd:%ju " - "from %s to %s with %ju remaining: %m\n"), - (intmax_t) range->in_offset, (intmax_t) range->out_offset, - range->length, range->in_filename, - range->out_filename, remaining); + "from %s to %s with %ju remaining: %m\n"), + (intmax_t) range->in_offset, (intmax_t) range->out_offset, + range->length, range->in_filename, + range->out_filename, remaining); if (copied == 0) break;