]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
Various pages: EXAMPLES: ffix
authorAlejandro Colomar <alx.manpages@gmail.com>
Mon, 2 May 2022 23:38:25 +0000 (01:38 +0200)
committerAlejandro Colomar <alx.manpages@gmail.com>
Mon, 2 May 2022 23:38:31 +0000 (01:38 +0200)
Mostly reported by checkpatch(1).  Fixed according to a mix of the
NGINX, git, and kernel coding styles.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
23 files changed:
man2/add_key.2
man2/bind.2
man2/clock_getres.2
man2/futex.2
man2/getdents.2
man2/getrlimit.2
man2/ioctl_ns.2
man2/kcmp.2
man2/keyctl.2
man2/memfd_create.2
man2/mprotect.2
man2/msgop.2
man2/open_by_handle_at.2
man2/perf_event_open.2
man2/pidfd_open.2
man2/pidfd_send_signal.2
man2/pivot_root.2
man2/poll.2
man2/seccomp_unotify.2
man2/select_tut.2
man2/sigaction.2
man2/stat.2
man2/userfaultfd.2

index 969af5c0778baac70ec88693ad8ea2335f164a9f..010c326b162d895261789154dd9a9a613ee710b5 100644 (file)
@@ -258,7 +258,7 @@ main(int argc, char *argv[])
     }
 
     key = add_key(argv[1], argv[2], argv[3], strlen(argv[3]),
-                KEY_SPEC_SESSION_KEYRING);
+                  KEY_SPEC_SESSION_KEYRING);
     if (key == \-1) {
         perror("add_key");
         exit(EXIT_FAILURE);
index a2dd96dcc7e3f1dd5baae15117a0d8c33a48ad18..7bebb7b63a3003626484f8dd3486d07cfdbd91f1 100644 (file)
@@ -248,7 +248,7 @@ main(void)
             sizeof(my_addr.sun_path) \- 1);
 
     if (bind(sfd, (struct sockaddr *) &my_addr,
-            sizeof(my_addr)) == \-1)
+             sizeof(my_addr)) == \-1)
         handle_error("bind");
 
     if (listen(sfd, LISTEN_BACKLOG) == \-1)
index 3ad9c901fcbb6f354857dd58d15cb62f83b4580f..90443c6c12b26b9755a7549a9bac7817c7db54cf 100644 (file)
@@ -466,16 +466,16 @@ displayClock(clockid_t clock, const char *name, bool showRes)
     }
 
     printf("%\-15s: %10jd.%03ld (", name,
-            (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);
+           (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);
 
     long days = ts.tv_sec / SECS_IN_DAY;
     if (days > 0)
         printf("%ld days + ", days);
 
     printf("%2dh %2dm %2ds",
-            (int) (ts.tv_sec % SECS_IN_DAY) / 3600,
-            (int) (ts.tv_sec % 3600) / 60,
-            (int) ts.tv_sec % 60);
+           (int) (ts.tv_sec % SECS_IN_DAY) / 3600,
+           (int) (ts.tv_sec % 3600) / 60,
+           (int) ts.tv_sec % 60);
     printf(")\en");
 
     if (clock_getres(clock, &ts) == \-1) {
@@ -485,7 +485,7 @@ displayClock(clockid_t clock, const char *name, bool showRes)
 
     if (showRes)
         printf("     resolution: %10jd.%09ld\en",
-                (intmax_t) ts.tv_sec, ts.tv_nsec);
+               (intmax_t) ts.tv_sec, ts.tv_nsec);
 }
 
 int
index ea31ccc2d61a05ee1697476655ee011dca12593a..5a685195634ac590a46492145372c342f1d296e3 100644 (file)
@@ -1897,7 +1897,7 @@ main(int argc, char *argv[])
        ones suffixed "_PRIVATE"). */
 
     iaddr = mmap(NULL, sizeof(*iaddr) * 2, PROT_READ | PROT_WRITE,
-                MAP_ANONYMOUS | MAP_SHARED, \-1, 0);
+                 MAP_ANONYMOUS | MAP_SHARED, \-1, 0);
     if (iaddr == MAP_FAILED)
         errExit("mmap");
 
index f7285b32b9bd622ed7f5803092cbe7ded4862fb6..be07aa051dd45a002029f7c7aeb37e783ffc224b 100644 (file)
@@ -306,7 +306,7 @@ main(int argc, char *argv[])
                              (d_type == DT_BLK) ?  "block dev" :
                              (d_type == DT_CHR) ?  "char dev" : "???");
             printf("%4d %10jd  %s\en", d\->d_reclen,
-                    (intmax_t) d\->d_off, d\->d_name);
+                   (intmax_t) d\->d_off, d\->d_name);
             bpos += d\->d_reclen;
         }
     }
index 9e690deb5ce03ce378966cfa566b4cdf66730b42..3736220771e245661a8078814cc950fcd33493e1 100644 (file)
@@ -807,14 +807,14 @@ main(int argc, char *argv[])
     if (prlimit(pid, RLIMIT_CPU, newp, &old) == \-1)
         errExit("prlimit\-1");
     printf("Previous limits: soft=%jd; hard=%jd\en",
-            (intmax_t) old.rlim_cur, (intmax_t) old.rlim_max);
+           (intmax_t) old.rlim_cur, (intmax_t) old.rlim_max);
 
     /* Retrieve and display new CPU time limit */
 
     if (prlimit(pid, RLIMIT_CPU, NULL, &old) == \-1)
         errExit("prlimit\-2");
     printf("New limits: soft=%jd; hard=%jd\en",
-            (intmax_t) old.rlim_cur, (intmax_t) old.rlim_max);
+           (intmax_t) old.rlim_cur, (intmax_t) old.rlim_max);
 
     exit(EXIT_SUCCESS);
 }
index fbb9cec0585b8b7493cd1b95d2e33f1a50853516..31cb592c6bbd57affaee08a3e2c8a1fd5082f5fb 100644 (file)
@@ -287,7 +287,7 @@ main(int argc, char *argv[])
         if (userns_fd == \-1) {
             if (errno == EPERM)
                 printf("The owning user namespace is outside "
-                        "your namespace scope\en");
+                       "your namespace scope\en");
             else
                perror("ioctl\-NS_GET_USERNS");
             exit(EXIT_FAILURE);
@@ -298,10 +298,10 @@ main(int argc, char *argv[])
             exit(EXIT_FAILURE);
         }
         printf("Device/Inode of owning user namespace is: "
-                "[%jx,%jx] / %ju\en",
-                (uintmax_t) major(sb.st_dev),
-                (uintmax_t) minor(sb.st_dev),
-                (uintmax_t) sb.st_ino);
+               "[%jx,%jx] / %ju\en",
+               (uintmax_t) major(sb.st_dev),
+               (uintmax_t) minor(sb.st_dev),
+               (uintmax_t) sb.st_ino);
 
         close(userns_fd);
     }
@@ -315,10 +315,10 @@ main(int argc, char *argv[])
         if (parent_fd == \-1) {
             if (errno == EINVAL)
                 printf("Can\(aq get parent namespace of a "
-                        "nonhierarchical namespace\en");
+                       "nonhierarchical namespace\en");
             else if (errno == EPERM)
                 printf("The parent namespace is outside "
-                        "your namespace scope\en");
+                       "your namespace scope\en");
             else
                 perror("ioctl\-NS_GET_PARENT");
             exit(EXIT_FAILURE);
@@ -329,9 +329,9 @@ main(int argc, char *argv[])
             exit(EXIT_FAILURE);
         }
         printf("Device/Inode of parent namespace is: [%jx,%jx] / %ju\en",
-                (uintmax_t) major(sb.st_dev),
-                (uintmax_t) minor(sb.st_dev),
-                (uintmax_t) sb.st_ino);
+               (uintmax_t) major(sb.st_dev),
+               (uintmax_t) minor(sb.st_dev),
+               (uintmax_t) sb.st_ino);
 
         close(parent_fd);
     }
index 8fad91b043e53c4d0bc514230b20a8e0547cf7bf..18efaad2b1e1d42f73024d6e4976fc470a298fc3 100644 (file)
@@ -363,8 +363,8 @@ test_kcmp(char *msg, pid_t pid1, pid_t pid2, int fd_a, int fd_b)
 {
     printf("\et%s\en", msg);
     printf("\et\etkcmp(%jd, %jd, KCMP_FILE, %d, %d) ==> %s\en",
-            (intmax_t) pid1, (intmax_t) pid2, fd_a, fd_b,
-            (kcmp(pid1, pid2, KCMP_FILE, fd_a, fd_b) == 0) ?
+           (intmax_t) pid1, (intmax_t) pid2, fd_a, fd_b,
+           (kcmp(pid1, pid2, KCMP_FILE, fd_a, fd_b) == 0) ?
                         "same" : "different");
 }
 
@@ -389,7 +389,7 @@ main(void)
         printf("PID of child of fork() is %jd\en", (intmax_t) getpid());
 
         test_kcmp("Compare duplicate FDs from different processes:",
-                getpid(), getppid(), fd1, fd1);
+                  getpid(), getppid(), fd1, fd1);
 
         fd2 = open(pathname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
         if (fd2 == \-1)
@@ -397,7 +397,7 @@ main(void)
         printf("Child opened file on FD %d\en", fd2);
 
         test_kcmp("Compare FDs from distinct open()s in same process:",
-                getpid(), getpid(), fd1, fd2);
+                  getpid(), getpid(), fd1, fd2);
 
         fd3 = dup(fd1);
         if (fd3 == \-1)
@@ -405,7 +405,7 @@ main(void)
         printf("Child duplicated FD %d to create FD %d\en", fd1, fd3);
 
         test_kcmp("Compare duplicated FDs in same process:",
-                getpid(), getpid(), fd1, fd3);
+                  getpid(), getpid(), fd1, fd3);
         break;
 
     default:
index d79c0746b4d493b9b02d0d21ea620833dd070e89..4f7f2a99b29759d9044302b5912d890722ed620b 100644 (file)
@@ -2165,7 +2165,7 @@ main(int argc, char *argv[])
      * Fetch the description of the key that is to be instantiated.
      */
     if (keyctl(KEYCTL_DESCRIBE, key_to_instantiate,
-                dbuf, sizeof(dbuf)) == \-1) {
+               dbuf, sizeof(dbuf)) == \-1) {
         fprintf(fp, "KEYCTL_DESCRIBE failed: %s\en", strerror(errno));
         exit(EXIT_FAILURE);
     }
@@ -2191,7 +2191,7 @@ main(int argc, char *argv[])
      * display it.
      */
     auth_key = keyctl(KEYCTL_GET_KEYRING_ID,
-            KEY_SPEC_REQKEY_AUTH_KEY);
+                      KEY_SPEC_REQKEY_AUTH_KEY);
     if (auth_key == \-1) {
         fprintf(fp, "KEYCTL_GET_KEYRING_ID failed: %s\en",
                 strerror(errno));
@@ -2221,7 +2221,8 @@ main(int argc, char *argv[])
      * string representing the ID of the key to be instantiated.
      */
     if (keyctl(KEYCTL_DESCRIBE, KEY_SPEC_REQKEY_AUTH_KEY,
-                dbuf, sizeof(dbuf)) == \-1) {
+               dbuf, sizeof(dbuf)) == \-1)
+    {
         fprintf(fp, "KEYCTL_DESCRIBE failed: %s\en", strerror(errno));
         exit(EXIT_FAILURE);
     }
@@ -2233,7 +2234,8 @@ main(int argc, char *argv[])
      * in the payload of the authorization key.
      */
     if (keyctl(KEYCTL_INSTANTIATE, key_to_instantiate,
-               auth_key_payload, akp_size + 1, dest_keyring) == \-1) {
+               auth_key_payload, akp_size + 1, dest_keyring) == \-1)
+    {
         fprintf(fp, "KEYCTL_INSTANTIATE failed: %s\en",
                 strerror(errno));
         exit(EXIT_FAILURE);
index 0d5b7817c5d254a118c5e71c4b40af4fc2f753fc..03b16a22055459d3cad6d4f859d76c1aae6a6111 100644 (file)
@@ -458,7 +458,7 @@ main(int argc, char *argv[])
         errExit("truncate");
 
     printf("PID: %jd; fd: %d; /proc/%jd/fd/%d\en",
-            (intmax_t) getpid(), fd, (intmax_t) getpid(), fd);
+           (intmax_t) getpid(), fd, (intmax_t) getpid(), fd);
 
     /* Code to map the file and populate the mapping with data
        omitted. */
index dc1dc122c46b7e0c0062f37e0fe2fdb65cb0e759..e3757ce353e0476845c43527ea68c1481d678e1b 100644 (file)
@@ -339,7 +339,7 @@ main(void)
     printf("Start of region:        %p\en", buffer);
 
     if (mprotect(buffer + pagesize * 2, pagesize,
-                PROT_READ) == \-1)
+                 PROT_READ) == \-1)
         handle_error("mprotect");
 
     for (char *p = buffer ; ; )
index ce87db91766661c9f1e1d2e98b4bf79f877cc2a9..7dcedcbb3eb43549b9feea61432e5109401a1fea 100644 (file)
@@ -598,10 +598,11 @@ send_msg(int qid, int msgtype)
 
     time(&t);
     snprintf(msg.mtext, sizeof(msg.mtext), "a message at %s",
-            ctime(&t));
+             ctime(&t));
 
     if (msgsnd(qid, &msg, sizeof(msg.mtext),
-                IPC_NOWAIT) == \-1) {
+               IPC_NOWAIT) == \-1)
+    {
         perror("msgsnd error");
         exit(EXIT_FAILURE);
     }
index c3e28ec361951a25a881417e44e8cb18b8c44b0e..adda0757dc243808fb29a151fea80a0bfda86329 100644 (file)
@@ -564,7 +564,9 @@ main(int argc, char *argv[])
     flags = 0;                  /* For name_to_handle_at() calls */
     fhp\->handle_bytes = 0;
     if (name_to_handle_at(dirfd, pathname, fhp,
-                &mount_id, flags) != \-1 || errno != EOVERFLOW) {
+                          &mount_id, flags) != \-1
+        || errno != EOVERFLOW)
+    {
         fprintf(stderr, "Unexpected result from name_to_handle_at()\en");
         exit(EXIT_FAILURE);
     }
@@ -680,8 +682,9 @@ main(int argc, char *argv[])
          Line 2: <handle_bytes> <handle_type>   <bytes of handle in hex>
     */
 
-    if ((fgets(line1, sizeof(line1), stdin) == NULL) ||
-           (fgets(line2, sizeof(line2), stdin) == NULL)) {
+    if (fgets(line1, sizeof(line1), stdin) == NULL ||
+        fgets(line2, sizeof(line2), stdin) == NULL)
+    {
         fprintf(stderr, "Missing mount_id / file handle\en");
         exit(EXIT_FAILURE);
     }
index cafed229710990a3c9d22aba060093692a306ecf..21118a0b9c393eb22afab1d00fda25b7c3f60861 100644 (file)
@@ -3742,7 +3742,7 @@ perf_event_open(struct perf_event_attr *hw_event, pid_t pid,
     int ret;
 
     ret = syscall(SYS_perf_event_open, hw_event, pid, cpu,
-                   group_fd, flags);
+                  group_fd, flags);
     return ret;
 }
 
index 8a003b62d5e18dc7f095f5a83c09f9cc2642a91e..3eed2695694deeea331472848dc2ca2f9218adc6 100644 (file)
@@ -251,7 +251,7 @@ main(int argc, char *argv[])
     }
 
     printf("Events (%#x): POLLIN is %sset\en", pollfd.revents,
-            (pollfd.revents & POLLIN) ? "" : "not ");
+           (pollfd.revents & POLLIN) ? "" : "not ");
 
     close(pidfd);
     exit(EXIT_SUCCESS);
index 7f23bcc1dbbbde78e936f5ec4f7bea13296fa2b4..321c0f9d964071b0fd13d2a21e3ef9326ae1bc0e 100644 (file)
@@ -181,7 +181,7 @@ fails with the error
 
 static int
 pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
-        unsigned int flags)
+                  unsigned int flags)
 {
     return syscall(SYS_pidfd_send_signal, pidfd, sig, info, flags);
 }
index aa7e401a60ae09594813a17150215243cc564900..2aec7a0b7bac00b67fe43e65abd0ee12a90c8f48 100644 (file)
@@ -388,7 +388,7 @@ main(int argc, char *argv[])
         errExit("mmap");
 
     if (clone(child, stack + STACK_SIZE,
-                CLONE_NEWNS | SIGCHLD, &argv[1]) == \-1)
+              CLONE_NEWNS | SIGCHLD, &argv[1]) == \-1)
         errExit("clone");
 
     /* Parent falls through to here; wait for child. */
index 85d395077309f23bf9b140c37d8ef6f62e3ab6e0..b9e4aaef4a7bcf38197ee667adccf9e8b4448231 100644 (file)
@@ -607,16 +607,16 @@ main(int argc, char *argv[])
 
             if (pfds[j].revents != 0) {
                 printf("  fd=%d; events: %s%s%s\en", pfds[j].fd,
-                        (pfds[j].revents & POLLIN)  ? "POLLIN "  : "",
-                        (pfds[j].revents & POLLHUP) ? "POLLHUP " : "",
-                        (pfds[j].revents & POLLERR) ? "POLLERR " : "");
+                       (pfds[j].revents & POLLIN)  ? "POLLIN "  : "",
+                       (pfds[j].revents & POLLHUP) ? "POLLHUP " : "",
+                       (pfds[j].revents & POLLERR) ? "POLLERR " : "");
 
                 if (pfds[j].revents & POLLIN) {
                     ssize_t s = read(pfds[j].fd, buf, sizeof(buf));
                     if (s == \-1)
                         errExit("read");
                     printf("    read %zd bytes: %.*s\en",
-                            s, (int) s, buf);
+                           s, (int) s, buf);
                 } else {                /* POLLERR | POLLHUP */
                     printf("    closing fd %d\en", pfds[j].fd);
                     if (close(pfds[j].fd) == \-1)
index 5f98b0cf9abb83ce620cd758cb225f2f780c6825..8d7ffac9253e969ce244343ef3e8d5c5974888c7 100644 (file)
@@ -1524,10 +1524,11 @@ recvfd(int sockfd)
 
     /* Check the validity of the \(aqcmsghdr\(aq */
 
-    if (cmsgp == NULL ||
-            cmsgp\->cmsg_len != CMSG_LEN(sizeof(int)) ||
-            cmsgp\->cmsg_level != SOL_SOCKET ||
-            cmsgp\->cmsg_type != SCM_RIGHTS) {
+    if (cmsgp == NULL
+        || cmsgp\->cmsg_len != CMSG_LEN(sizeof(int))
+        || cmsgp\->cmsg_level != SOL_SOCKET
+        || cmsgp\->cmsg_type != SCM_RIGHTS)
+    {
         errno = EINVAL;
         return \-1;
     }
@@ -1564,7 +1565,7 @@ seccomp(unsigned int operation, unsigned int flags, void *args)
 
 #define X86_64_CHECK_ARCH_AND_LOAD_SYSCALL_NR \e
         BPF_STMT(BPF_LD | BPF_W | BPF_ABS, \e
-                (offsetof(struct seccomp_data, arch))), \e
+                 (offsetof(struct seccomp_data, arch))), \e
         BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, AUDIT_ARCH_X86_64, 0, 2), \e
         BPF_STMT(BPF_LD | BPF_W | BPF_ABS, \e
                  (offsetof(struct seccomp_data, nr))), \e
@@ -1774,8 +1775,8 @@ getTargetPathname(struct seccomp_notif *req, int notifyFd,
 
 static void
 allocSeccompNotifBuffers(struct seccomp_notif **req,
-        struct seccomp_notif_resp **resp,
-        struct seccomp_notif_sizes *sizes)
+                         struct seccomp_notif_resp **resp,
+                         struct seccomp_notif_sizes *sizes)
 {
     /* Discover the sizes of the structures that are used to receive
        notifications and send notification responses, and allocate
@@ -1834,7 +1835,7 @@ handleNotifications(int notifyFd)
         }
 
         printf("\etS: got notification (ID %#llx) for PID %d\en",
-                req\->id, req\->pid);
+               req\->id, req\->pid);
 
         /* The only system call that can generate a notification event
            is mkdir(2). Nevertheless, we check that the notified system
@@ -1844,7 +1845,7 @@ handleNotifications(int notifyFd)
 
         if (req\->data.nr != SYS_mkdir) {
             printf("\etS: notification contained unexpected "
-                    "system call number; bye!!!\en");
+                   "system call number; bye!!!\en");
             exit(EXIT_FAILURE);
         }
 
@@ -1869,17 +1870,17 @@ handleNotifications(int notifyFd)
         if (!pathOK) {
             resp->error = -EINVAL;
             printf("\etS: spoofing error for invalid pathname (%s)\en",
-                    strerror(-resp->error));
+                   strerror(-resp->error));
         } else if (strncmp(path, "/tmp/", strlen("/tmp/")) == 0) {
             printf("\etS: executing: mkdir(\e"%s\e", %#llo)\en",
-                    path, req\->data.args[1]);
+                   path, req\->data.args[1]);
 
             if (mkdir(path, req\->data.args[1]) == 0) {
                 resp\->error = 0;            /* "Success" */
                 resp\->val = strlen(path);   /* Used as return value of
                                                mkdir() in target */
                 printf("\etS: success! spoofed return = %lld\en",
-                        resp\->val);
+                       resp\->val);
             } else {
 
                 /* If mkdir() failed in the supervisor, pass the error
@@ -1887,7 +1888,7 @@ handleNotifications(int notifyFd)
 
                 resp\->error = \-errno;
                 printf("\etS: failure! (errno = %d; %s)\en", errno,
-                        strerror(errno));
+                       strerror(errno));
             }
         } else if (strncmp(path, "./", strlen("./")) == 0) {
             resp\->error = resp\->val = 0;
@@ -1896,20 +1897,20 @@ handleNotifications(int notifyFd)
         } else {
             resp\->error = \-EOPNOTSUPP;
             printf("\etS: spoofing error response (%s)\en",
-                    strerror(\-resp\->error));
+                   strerror(\-resp\->error));
         }
 
         /* Send a response to the notification */
 
         printf("\etS: sending response "
-                "(flags = %#x; val = %lld; error = %d)\en",
-                resp\->flags, resp\->val, resp\->error);
+               "(flags = %#x; val = %lld; error = %d)\en",
+               resp\->flags, resp\->val, resp\->error);
 
         if (ioctl(notifyFd, SECCOMP_IOCTL_NOTIF_SEND, resp) == \-1) {
             if (errno == ENOENT)
                 printf("\etS: response failed with ENOENT; "
-                        "perhaps target process\(aqs syscall was "
-                        "interrupted by a signal?\en");
+                       "perhaps target process\(aqs syscall was "
+                       "interrupted by a signal?\en");
             else
                 perror("ioctl\-SECCOMP_IOCTL_NOTIF_SEND");
         }
index c2944ac1efce2c15aea6fd5627b9fdf2340acf78..d84f3b86883ad513b229fcdf21f3a430fc30bae7 100644 (file)
@@ -366,7 +366,8 @@ listen_socket(int listen_port)
 
     yes = 1;
     if (setsockopt(lfd, SOL_SOCKET, SO_REUSEADDR,
-            &yes, sizeof(yes)) == \-1) {
+                   &yes, sizeof(yes)) == \-1)
+    {
         perror("setsockopt");
         close(lfd);
         return \-1;
@@ -446,7 +447,7 @@ main(int argc, char *argv[])
 
     if (argc != 4) {
         fprintf(stderr, "Usage\en\etfwd <listen\-port> "
-                 "<forward\-to\-port> <forward\-to\-ip\-address>\en");
+                "<forward\-to\-port> <forward\-to\-ip\-address>\en");
         exit(EXIT_FAILURE);
     }
 
@@ -521,7 +522,7 @@ main(int argc, char *argv[])
                     SHUT_FD1;
                 else
                     printf("connect from %s\en",
-                            inet_ntoa(client_addr.sin_addr));
+                           inet_ntoa(client_addr.sin_addr));
 
                 /* Skip any events on the old, closed file
                    descriptors. */
@@ -552,7 +553,7 @@ main(int argc, char *argv[])
         }
         if (fd1 > 0 && FD_ISSET(fd1, &readfds)) {
             nbytes = read(fd1, buf1 + buf1_avail,
-                      BUF_SIZE \- buf1_avail);
+                          BUF_SIZE \- buf1_avail);
             if (nbytes < 1)
                 SHUT_FD1;
             else
@@ -560,7 +561,7 @@ main(int argc, char *argv[])
         }
         if (fd2 > 0 && FD_ISSET(fd2, &readfds)) {
             nbytes = read(fd2, buf2 + buf2_avail,
-                      BUF_SIZE \- buf2_avail);
+                          BUF_SIZE \- buf2_avail);
             if (nbytes < 1)
                 SHUT_FD2;
             else
@@ -568,7 +569,7 @@ main(int argc, char *argv[])
         }
         if (fd1 > 0 && FD_ISSET(fd1, &writefds) && buf2_avail > 0) {
             nbytes = write(fd1, buf2 + buf2_written,
-                       buf2_avail \- buf2_written);
+                           buf2_avail \- buf2_written);
             if (nbytes < 1)
                 SHUT_FD1;
             else
@@ -576,7 +577,7 @@ main(int argc, char *argv[])
         }
         if (fd2 > 0 && FD_ISSET(fd2, &writefds) && buf1_avail > 0) {
             nbytes = write(fd2, buf1 + buf1_written,
-                       buf1_avail \- buf1_written);
+                           buf1_avail \- buf1_written);
             if (nbytes < 1)
                 SHUT_FD2;
             else
index 77909776684daf19e1d4d907840d24877de164ed..23777eebcaba4617671241fde3eed30ea406bb1b 100644 (file)
@@ -1150,9 +1150,10 @@ handler(int signo, siginfo_t *info, void *context)
 {
     struct sigaction oldact;
 
-    if (sigaction(SIGSEGV, NULL, &oldact) == \-1 ||
-            (oldact.sa_flags & SA_UNSUPPORTED) ||
-            !(oldact.sa_flags & SA_EXPOSE_TAGBITS)) {
+    if (sigaction(SIGSEGV, NULL, &oldact) == \-1
+        || (oldact.sa_flags & SA_UNSUPPORTED)
+        || !(oldact.sa_flags & SA_EXPOSE_TAGBITS))
+    {
         _exit(EXIT_FAILURE);
     }
     _exit(EXIT_SUCCESS);
index 0fd90b1064ffc75186eb992d9e09217b4be36190..de41bb20154aa78d1dca80b0d962d22b3cd3b8a8 100644 (file)
@@ -482,8 +482,8 @@ main(int argc, char *argv[])
     }
 
     printf("ID of containing device:  [%jx,%jx]\en",
-            (uintmax_t) major(sb.st_dev),
-            (uintmax_t) minor(sb.st_dev));
+           (uintmax_t) major(sb.st_dev),
+           (uintmax_t) minor(sb.st_dev));
 
     printf("File type:                ");
 
@@ -501,18 +501,18 @@ main(int argc, char *argv[])
     printf("I\-node number:            %ju\en", (uintmax_t) sb.st_ino);
 
     printf("Mode:                     %jo (octal)\en",
-            (uintmax_t) sb.st_mode);
+           (uintmax_t) sb.st_mode);
 
     printf("Link count:               %ju\en", (uintmax_t) sb.st_nlink);
     printf("Ownership:                UID=%ju   GID=%ju\en",
-            (uintmax_t) sb.st_uid, (uintmax_t) sb.st_gid);
+           (uintmax_t) sb.st_uid, (uintmax_t) sb.st_gid);
 
     printf("Preferred I/O block size: %jd bytes\en",
-            (intmax_t) sb.st_blksize);
+           (intmax_t) sb.st_blksize);
     printf("File size:                %jd bytes\en",
-            (intmax_t) sb.st_size);
+           (intmax_t) sb.st_size);
     printf("Blocks allocated:         %jd\en",
-            (intmax_t) sb.st_blocks);
+           (intmax_t) sb.st_blocks);
 
     printf("Last status change:       %s", ctime(&sb.st_ctime));
     printf("Last file access:         %s", ctime(&sb.st_atime));
index bb3b64a07d5e4139e9a19c19529ca5832f5d8063..592458279f322d2f8f36e4d57a2dd6814fc64410 100644 (file)
@@ -791,9 +791,9 @@ fault_handler_thread(void *arg)
 
         printf("\enfault_handler_thread():\en");
         printf("    poll() returns: nready = %d; "
-                "POLLIN = %d; POLLERR = %d\en", nready,
-                (pollfd.revents & POLLIN) != 0,
-                (pollfd.revents & POLLERR) != 0);
+               "POLLIN = %d; POLLERR = %d\en", nready,
+               (pollfd.revents & POLLIN) != 0,
+               (pollfd.revents & POLLERR) != 0);
 
         /* Read an event from the userfaultfd. */
 
@@ -840,7 +840,7 @@ fault_handler_thread(void *arg)
             errExit("ioctl\-UFFDIO_COPY");
 
         printf("        (uffdio_copy.copy returned %"PRId64")\en",
-                uffdio_copy.copy);
+               uffdio_copy.copy);
     }
 }