]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
style: (misc-utils/copyfilerange.c) fix indentation
authorChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Thu, 9 Apr 2026 15:10:53 +0000 (11:10 -0400)
committerChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Wed, 15 Apr 2026 12:18:31 +0000 (08:18 -0400)
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
include/fileutils.h
misc-utils/copyfilerange.c

index d1b2ddf08f2a8fdced7c49ce2f0554e05cfd8a24..88e8b21142a0292f11f9631102092dbd936ca000 100644 (file)
@@ -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 */
index 00c508fb548425e314fc58a82c4bcf0eb6ea4516..a4baf60ce74087a712d09c66e433039ad4f06c9a 100644 (file)
@@ -71,8 +71,8 @@ static void __attribute__((__noreturn__)) usage(void)
 
        fputs(USAGE_ARGUMENTS, out);
        fputsln(_(" <range> is of the form <source_offset>:<destination_offset>:<length>,\n"
-                 " with all values in bytes. If <length> 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 <length> 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;