Browse Source

Fix a few spacing style issues

Reported by kernel's checkpatch.pl script.
Dmitry V. Levin 2 years ago
parent
commit
184e94ba05
100 changed files with 587 additions and 602 deletions
  1. 2
    2
      aio.c
  2. 13
    13
      block.c
  3. 3
    3
      bpf.c
  4. 4
    4
      btrfs.c
  5. 1
    1
      clone.c
  6. 63
    63
      configure.ac
  7. 11
    11
      defs.h
  8. 1
    2
      desc.c
  9. 1
    1
      dirent.c
  10. 1
    1
      dirent64.c
  11. 1
    1
      dm.c
  12. 1
    1
      evdev.c
  13. 1
    1
      fetch_struct_statfs.c
  14. 3
    3
      file_ioctl.c
  15. 1
    1
      gcc_compat.h
  16. 4
    3
      io.c
  17. 2
    2
      ioctlsort.c
  18. 1
    1
      kcmp.c
  19. 1
    1
      kexec.c
  20. 21
    21
      linux/aarch64/arch_regs.c
  21. 1
    1
      linux/arm/get_scno.c
  22. 3
    2
      linux/bfin/get_syscall_args.c
  23. 4
    4
      linux/personality.h
  24. 10
    10
      linux/sh64/arch_regs.h
  25. 10
    4
      linux/x86_64/get_scno.c
  26. 2
    2
      linux/x86_64/set_error.c
  27. 1
    1
      mem.c
  28. 1
    1
      msghdr.c
  29. 6
    6
      numa.c
  30. 2
    2
      open.c
  31. 10
    10
      or1k_atomic.c
  32. 68
    68
      perf.c
  33. 28
    28
      perf_event_struct.h
  34. 1
    1
      qualify.c
  35. 5
    10
      quota.c
  36. 3
    6
      resource.c
  37. 6
    12
      signal.c
  38. 2
    2
      socketutils.c
  39. 2
    2
      statx.h
  40. 19
    28
      strace.c
  41. 4
    7
      syscall.c
  42. 1
    1
      sysctl.c
  43. 1
    1
      test/clone.c
  44. 1
    1
      test/seccomp.c
  45. 15
    8
      test/threaded_execve.c
  46. 1
    2
      tests/add_key.c
  47. 13
    13
      tests/aio.c
  48. 22
    22
      tests/btrfs.c
  49. 2
    1
      tests/errno2name.c
  50. 2
    2
      tests/futex.c
  51. 4
    4
      tests/getcpu.c
  52. 1
    1
      tests/ioctl.c
  53. 22
    22
      tests/ioctl_sg_io_v3.c
  54. 14
    14
      tests/ioctl_sg_io_v4.c
  55. 1
    1
      tests/ioctl_sock_gifconf.c
  56. 1
    1
      tests/ioctl_uffdio.c
  57. 6
    6
      tests/ioctl_v4l2.c
  58. 1
    1
      tests/ip_mreq.c
  59. 1
    1
      tests/ipc_msgbuf.c
  60. 4
    4
      tests/ipc_sem.c
  61. 1
    1
      tests/ksysent.c
  62. 1
    1
      tests/mmsg_name.c
  63. 1
    1
      tests/mq.c
  64. 1
    1
      tests/mq_sendrecv.c
  65. 3
    3
      tests/msg_control.c
  66. 1
    1
      tests/net-y-unix.c
  67. 2
    2
      tests/net-yy-inet.c
  68. 1
    1
      tests/net-yy-unix.c
  69. 1
    1
      tests/nsyscalls.c
  70. 42
    42
      tests/perf_event_open.c
  71. 4
    3
      tests/ppoll.c
  72. 1
    1
      tests/print_quoted_string.c
  73. 0
    2
      tests/print_time.c
  74. 10
    9
      tests/process_vm_readv_writev.c
  75. 2
    2
      tests/pselect6.c
  76. 2
    2
      tests/ptrace.c
  77. 1
    1
      tests/quotactl-xfs.c
  78. 2
    2
      tests/readahead.c
  79. 4
    4
      tests/reboot.c
  80. 1
    2
      tests/request_key.c
  81. 1
    1
      tests/rt_sigqueueinfo.c
  82. 3
    2
      tests/rt_tgsigqueueinfo.c
  83. 1
    1
      tests/sched_get_priority_mxx.c
  84. 1
    1
      tests/seccomp-filter-v.c
  85. 1
    2
      tests/semop.c
  86. 1
    1
      tests/sigaction.c
  87. 2
    1
      tests/signal2name.c
  88. 2
    2
      tests/signal_receive.c
  89. 1
    1
      tests/stack-fcall.c
  90. 1
    1
      tests/statx.c
  91. 1
    1
      tests/times-fail.c
  92. 1
    1
      tests/times.c
  93. 1
    1
      tests/unix-pair-sendto-recvfrom.c
  94. 2
    1
      tests/waitid.c
  95. 2
    2
      tests/xselect.c
  96. 2
    3
      time.c
  97. 4
    4
      uid.c
  98. 34
    36
      unwind.c
  99. 8
    9
      util.c
  100. 0
    0
      v4l2.c

+ 2
- 2
aio.c View File

@@ -167,9 +167,9 @@ print_iocbp(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
167 167
 	struct iocb cb;
168 168
 
169 169
 	if (elem_size < sizeof(kernel_ulong_t)) {
170
-		addr = * (unsigned int *) elem_buf;
170
+		addr = *(unsigned int *) elem_buf;
171 171
 	} else {
172
-		addr = * (kernel_ulong_t *) elem_buf;
172
+		addr = *(kernel_ulong_t *) elem_buf;
173 173
 	}
174 174
 
175 175
 	tprints("{");

+ 13
- 13
block.c View File

@@ -67,7 +67,7 @@ typedef struct blk_user_trace_setup {
67 67
 #include MPERS_DEFS
68 68
 
69 69
 #ifndef BLKPG
70
-# define BLKPG      _IO(0x12,105)
70
+# define BLKPG      _IO(0x12, 105)
71 71
 #endif
72 72
 
73 73
 /*
@@ -80,40 +80,40 @@ typedef struct blk_user_trace_setup {
80 80
 # define BLKTRACESETUP _IOWR(0x12, 115, struct_blk_user_trace_setup)
81 81
 #endif
82 82
 #ifndef BLKTRACESTART
83
-# define BLKTRACESTART _IO(0x12,116)
83
+# define BLKTRACESTART _IO(0x12, 116)
84 84
 #endif
85 85
 #ifndef BLKTRACESTOP
86
-# define BLKTRACESTOP _IO(0x12,117)
86
+# define BLKTRACESTOP _IO(0x12, 117)
87 87
 #endif
88 88
 #ifndef BLKTRACETEARDOWN
89
-# define BLKTRACETEARDOWN _IO(0x12,118)
89
+# define BLKTRACETEARDOWN _IO(0x12, 118)
90 90
 #endif
91 91
 #ifndef BLKDISCARD
92
-# define BLKDISCARD _IO(0x12,119)
92
+# define BLKDISCARD _IO(0x12, 119)
93 93
 #endif
94 94
 #ifndef BLKIOMIN
95
-# define BLKIOMIN _IO(0x12,120)
95
+# define BLKIOMIN _IO(0x12, 120)
96 96
 #endif
97 97
 #ifndef BLKIOOPT
98
-# define BLKIOOPT _IO(0x12,121)
98
+# define BLKIOOPT _IO(0x12, 121)
99 99
 #endif
100 100
 #ifndef BLKALIGNOFF
101
-# define BLKALIGNOFF _IO(0x12,122)
101
+# define BLKALIGNOFF _IO(0x12, 122)
102 102
 #endif
103 103
 #ifndef BLKPBSZGET
104
-# define BLKPBSZGET _IO(0x12,123)
104
+# define BLKPBSZGET _IO(0x12, 123)
105 105
 #endif
106 106
 #ifndef BLKDISCARDZEROES
107
-# define BLKDISCARDZEROES _IO(0x12,124)
107
+# define BLKDISCARDZEROES _IO(0x12, 124)
108 108
 #endif
109 109
 #ifndef BLKSECDISCARD
110
-# define BLKSECDISCARD _IO(0x12,125)
110
+# define BLKSECDISCARD _IO(0x12, 125)
111 111
 #endif
112 112
 #ifndef BLKROTATIONAL
113
-# define BLKROTATIONAL _IO(0x12,126)
113
+# define BLKROTATIONAL _IO(0x12, 126)
114 114
 #endif
115 115
 #ifndef BLKZEROOUT
116
-# define BLKZEROOUT _IO(0x12,127)
116
+# define BLKZEROOUT _IO(0x12, 127)
117 117
 #endif
118 118
 
119 119
 #include "xlat/blkpg_ops.h"

+ 3
- 3
bpf.c View File

@@ -182,7 +182,7 @@ bpf_prog_load(struct tcb *const tcp, const kernel_ulong_t addr,
182 182
 
183 183
 static int
184 184
 bpf_obj_manage(struct tcb *const tcp, const kernel_ulong_t addr,
185
-               unsigned int size)
185
+	       unsigned int size)
186 186
 {
187 187
 	struct {
188 188
 		uint64_t ATTRIBUTE_ALIGNED(8) pathname;
@@ -243,14 +243,14 @@ bpf_prog_attach_detach(struct tcb *const tcp, const kernel_ulong_t addr,
243 243
 
244 244
 static int
245 245
 bpf_prog_attach(struct tcb *const tcp, const kernel_ulong_t addr,
246
-               unsigned int size)
246
+		unsigned int size)
247 247
 {
248 248
 	return bpf_prog_attach_detach(tcp, addr, size, true);
249 249
 }
250 250
 
251 251
 static int
252 252
 bpf_prog_detach(struct tcb *const tcp, const kernel_ulong_t addr,
253
-               unsigned int size)
253
+		unsigned int size)
254 254
 {
255 255
 	return bpf_prog_attach_detach(tcp, addr, size, false);
256 256
 }

+ 4
- 4
btrfs.c View File

@@ -367,7 +367,7 @@ btrfs_print_ino_path_container(struct tcb *tcp,
367 367
 static bool
368 368
 print_uint64(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
369 369
 {
370
-	tprintf("%" PRIu64, * (uint64_t *) elem_buf);
370
+	tprintf("%" PRIu64, *(uint64_t *) elem_buf);
371 371
 
372 372
 	return true;
373 373
 }
@@ -488,7 +488,7 @@ static bool
488 488
 print_objectid_callback(struct tcb *tcp, void *elem_buf,
489 489
 			size_t elem_size, void *data)
490 490
 {
491
-	btrfs_print_objectid(* (uint64_t *) elem_buf);
491
+	btrfs_print_objectid(*(uint64_t *) elem_buf);
492 492
 
493 493
 	return true;
494 494
 }
@@ -679,12 +679,12 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
679 679
 				   (uint64_t) args.start.srcdevid,
680 680
 				   (uint64_t) args.start.cont_reading_from_srcdev_mode);
681 681
 
682
-				str = (const char*) args.start.srcdev_name;
682
+				str = (const char *) args.start.srcdev_name;
683 683
 				print_quoted_string(str,
684 684
 						sizeof(args.start.srcdev_name),
685 685
 						QUOTE_0_TERMINATED);
686 686
 				tprints(", tgtdev_name=");
687
-				str = (const char*) args.start.tgtdev_name;
687
+				str = (const char *) args.start.tgtdev_name;
688 688
 				print_quoted_string(str,
689 689
 						sizeof(args.start.tgtdev_name),
690 690
 						QUOTE_0_TERMINATED);

+ 1
- 1
clone.c View File

@@ -109,7 +109,7 @@ SYS_FUNC(clone)
109 109
 				tcp->u_arg[ARG_STACKSIZE]);
110 110
 #endif
111 111
 		tprints("flags=");
112
-		if (!printflags64(clone_flags, flags &~ CSIGNAL, NULL))
112
+		if (!printflags64(clone_flags, flags & ~CSIGNAL, NULL))
113 113
 			sep = "";
114 114
 		if ((flags & CSIGNAL) != 0)
115 115
 			tprintf("%s%s", sep, signame(flags & CSIGNAL));

+ 63
- 63
configure.ac View File

@@ -488,8 +488,8 @@ AC_CHECK_HEADERS([linux/btrfs.h], [
488 488
 		struct btrfs_ioctl_search_args_v2.buf_size
489 489
 		]),,, [ #include <stdio.h>
490 490
 #include <linux/btrfs.h>])
491
-        AC_CHECK_DECLS(m4_normalize([BTRFS_COMPRESS_NONE, BTRFS_COMPRESS_ZLIB,
492
-	                        BTRFS_COMPRESS_LZO]),,,[ #include <stdio.h>
491
+	AC_CHECK_DECLS(m4_normalize([BTRFS_COMPRESS_NONE, BTRFS_COMPRESS_ZLIB,
492
+				BTRFS_COMPRESS_LZO]),,,[ #include <stdio.h>
493 493
 #include <linux/btrfs.h>])])
494 494
 
495 495
 AC_CHECK_DECLS([sys_errlist])
@@ -683,7 +683,7 @@ AC_CACHE_CHECK([for SIGRTMIN], [st_cv_SIGRTMIN],
683 683
 	       [[st_cv_SIGRTMIN="$(echo SIGRTMIN |
684 684
 			$CPP $CPPFLAGS -P -imacros asm/signal.h - |
685 685
 			grep '^[0-9]')"
686
-	         test -n "$st_cv_SIGRTMIN" || st_cv_SIGRTMIN=no]])
686
+		 test -n "$st_cv_SIGRTMIN" || st_cv_SIGRTMIN=no]])
687 687
 if test "x$st_cv_SIGRTMIN" != xno; then
688 688
 	AC_DEFINE_UNQUOTED([ASM_SIGRTMIN], [$st_cv_SIGRTMIN],
689 689
 			   [SIGRTMIN defined in <asm/signal.h>])
@@ -692,7 +692,7 @@ AC_CACHE_CHECK([for SA_RESTORER], [st_cv_SA_RESTORER],
692 692
 	       [st_cv_SA_RESTORER="$(echo SA_RESTORER |
693 693
 			$CPP $CPPFLAGS -P -imacros asm/signal.h - |
694 694
 			grep ^0x)"
695
-	        test -n "$st_cv_SA_RESTORER" || st_cv_SA_RESTORER=no])
695
+		test -n "$st_cv_SA_RESTORER" || st_cv_SA_RESTORER=no])
696 696
 if test "x$st_cv_SA_RESTORER" != xno; then
697 697
 	AC_DEFINE_UNQUOTED([ASM_SA_RESTORER], [$st_cv_SA_RESTORER],
698 698
 			   [SA_RESTORER defined in <asm/signal.h>])
@@ -720,15 +720,15 @@ libunwind_CPPFLAGS=
720 720
 libunwind_LDFLAGS=
721 721
 libunwind_LIBS=
722 722
 AC_ARG_WITH([libunwind],
723
-            [AS_HELP_STRING([--with-libunwind],
724
-                            [use libunwind to implement stack tracing support])],
725
-            [case "${withval}" in
726
-             yes|no|check) ;;
727
-             *) with_libunwind=yes
728
-                libunwind_CPPFLAGS="-I${withval}/include"
729
-                libunwind_LDFLAGS="-L${withval}/lib" ;;
730
-             esac],
731
-            [with_libunwind=check]
723
+	    [AS_HELP_STRING([--with-libunwind],
724
+			    [use libunwind to implement stack tracing support])],
725
+	    [case "${withval}" in
726
+	     yes|no|check) ;;
727
+	     *) with_libunwind=yes
728
+		libunwind_CPPFLAGS="-I${withval}/include"
729
+		libunwind_LDFLAGS="-L${withval}/lib" ;;
730
+	     esac],
731
+	    [with_libunwind=check]
732 732
 )
733 733
 
734 734
 use_libunwind=no
@@ -737,56 +737,56 @@ AS_IF([test "x$with_libunwind" != xno],
737 737
        CPPFLAGS="$CPPFLAGS $libunwind_CPPFLAGS"
738 738
 
739 739
        AC_CHECK_HEADERS([libunwind-ptrace.h],
740
-         [saved_LDFLAGS="$LDFLAGS"
741
-          LDFLAGS="$LDFLAGS $libunwind_LDFLAGS"
742
-
743
-          AC_CHECK_LIB([unwind], [backtrace],
744
-            [libunwind_LIBS="-lunwind $libunwind_LIBS"
745
-
746
-             AC_MSG_CHECKING([for unw_create_addr_space in libunwind-generic])
747
-             saved_LIBS="$LIBS"
748
-             LIBS="-lunwind-generic $libunwind_LIBS $LIBS"
749
-
750
-             AC_LINK_IFELSE(
751
-               [AC_LANG_PROGRAM([[#include <libunwind-ptrace.h>]],
752
-                                [[return !unw_create_addr_space(0, 0)]])
753
-               ],
754
-               [AC_MSG_RESULT([yes])
755
-                libunwind_LIBS="-lunwind-generic $libunwind_LIBS"
756
-
757
-                AC_CHECK_LIB([unwind-ptrace], [_UPT_create],
758
-                  [libunwind_LIBS="-lunwind-ptrace $libunwind_LIBS"
759
-                   use_libunwind=yes
760
-                  ],
761
-                  [if test "x$with_libunwind" != xcheck; then
762
-                     AC_MSG_FAILURE([failed to find _UPT_create in libunwind-ptrace])
763
-                   fi
764
-                  ],
765
-                  [$libunwind_LIBS]
766
-                )
767
-               ],
768
-               [AC_MSG_RESULT([no])
769
-                if test "x$with_libunwind" != xcheck; then
770
-                  AC_MSG_FAILURE([failed to find unw_create_addr_space in libunwind-generic])
771
-                fi
772
-               ]
773
-             )
774
-
775
-             LIBS="$saved_LIBS"
776
-            ],
777
-            [if test "x$with_libunwind" != xcheck; then
778
-               AC_MSG_FAILURE([failed to find libunwind])
779
-             fi
780
-            ],
781
-            [$libunwind_LIBS]
782
-          )
783
-
784
-          LDFLAGS="$saved_LDFLAGS"
785
-         ],
786
-         [if test "x$with_libunwind" != xcheck; then
787
-            AC_MSG_FAILURE([failed to find libunwind-ptrace.h])
788
-          fi
789
-         ]
740
+	 [saved_LDFLAGS="$LDFLAGS"
741
+	  LDFLAGS="$LDFLAGS $libunwind_LDFLAGS"
742
+
743
+	  AC_CHECK_LIB([unwind], [backtrace],
744
+	    [libunwind_LIBS="-lunwind $libunwind_LIBS"
745
+
746
+	     AC_MSG_CHECKING([for unw_create_addr_space in libunwind-generic])
747
+	     saved_LIBS="$LIBS"
748
+	     LIBS="-lunwind-generic $libunwind_LIBS $LIBS"
749
+
750
+	     AC_LINK_IFELSE(
751
+	       [AC_LANG_PROGRAM([[#include <libunwind-ptrace.h>]],
752
+				[[return !unw_create_addr_space(0, 0)]])
753
+	       ],
754
+	       [AC_MSG_RESULT([yes])
755
+		libunwind_LIBS="-lunwind-generic $libunwind_LIBS"
756
+
757
+		AC_CHECK_LIB([unwind-ptrace], [_UPT_create],
758
+		  [libunwind_LIBS="-lunwind-ptrace $libunwind_LIBS"
759
+		   use_libunwind=yes
760
+		  ],
761
+		  [if test "x$with_libunwind" != xcheck; then
762
+		     AC_MSG_FAILURE([failed to find _UPT_create in libunwind-ptrace])
763
+		   fi
764
+		  ],
765
+		  [$libunwind_LIBS]
766
+		)
767
+	       ],
768
+	       [AC_MSG_RESULT([no])
769
+		if test "x$with_libunwind" != xcheck; then
770
+		  AC_MSG_FAILURE([failed to find unw_create_addr_space in libunwind-generic])
771
+		fi
772
+	       ]
773
+	     )
774
+
775
+	     LIBS="$saved_LIBS"
776
+	    ],
777
+	    [if test "x$with_libunwind" != xcheck; then
778
+	       AC_MSG_FAILURE([failed to find libunwind])
779
+	     fi
780
+	    ],
781
+	    [$libunwind_LIBS]
782
+	  )
783
+
784
+	  LDFLAGS="$saved_LDFLAGS"
785
+	 ],
786
+	 [if test "x$with_libunwind" != xcheck; then
787
+	    AC_MSG_FAILURE([failed to find libunwind-ptrace.h])
788
+	  fi
789
+	 ]
790 790
        )
791 791
 
792 792
        CPPFLAGS="$saved_CPPFLAGS"

+ 11
- 11
defs.h View File

@@ -106,7 +106,7 @@ extern char *stpcpy(char *dst, const char *src);
106 106
  *
107 107
  * Make sure that all entries in all syscallent.h files have nargs <= MAX_ARGS!
108 108
  * linux/<ARCH>/syscallent*.h:
109
- * 	all have nargs <= 6 except mips o32 which has nargs <= 7.
109
+ *	all have nargs <= 6 except mips o32 which has nargs <= 7.
110 110
  */
111 111
 #ifndef MAX_ARGS
112 112
 # ifdef LINUX_MIPSO32
@@ -234,11 +234,11 @@ struct tcb {
234 234
 	struct timeval etime;	/* Syscall entry time */
235 235
 
236 236
 #ifdef USE_LIBUNWIND
237
-	struct UPT_info* libunwind_ui;
238
-	struct mmap_cache_t* mmap_cache;
237
+	struct UPT_info *libunwind_ui;
238
+	struct mmap_cache_t *mmap_cache;
239 239
 	unsigned int mmap_cache_size;
240 240
 	unsigned int mmap_cache_generation;
241
-	struct queue_t* queue;
241
+	struct queue_t *queue;
242 242
 #endif
243 243
 };
244 244
 
@@ -383,7 +383,7 @@ extern unsigned ptrace_setoptions;
383 383
 extern unsigned max_strlen;
384 384
 extern unsigned os_release;
385 385
 #undef KERNEL_VERSION
386
-#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
386
+#define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
387 387
 
388 388
 void error_msg(const char *fmt, ...) ATTRIBUTE_FORMAT((printf, 1, 2));
389 389
 void perror_msg(const char *fmt, ...) ATTRIBUTE_FORMAT((printf, 1, 2));
@@ -533,10 +533,10 @@ str_strip_prefix_len(const char *str, const char *prefix, size_t prefix_len)
533 533
 #define STR_STRIP_PREFIX(str, prefix)	\
534 534
 	str_strip_prefix_len((str), (prefix), sizeof(prefix) - 1)
535 535
 
536
-#define QUOTE_0_TERMINATED                      0x01
537
-#define QUOTE_OMIT_LEADING_TRAILING_QUOTES      0x02
538
-#define QUOTE_OMIT_TRAILING_0                   0x08
539
-#define QUOTE_FORCE_HEX                         0x10
536
+#define QUOTE_0_TERMINATED			0x01
537
+#define QUOTE_OMIT_LEADING_TRAILING_QUOTES	0x02
538
+#define QUOTE_OMIT_TRAILING_0			0x08
539
+#define QUOTE_FORCE_HEX				0x10
540 540
 
541 541
 extern int string_quote(const char *, char *, unsigned int, unsigned int);
542 542
 extern int print_quoted_string(const char *, unsigned int, unsigned int);
@@ -545,10 +545,10 @@ extern int print_quoted_string(const char *, unsigned int, unsigned int);
545 545
  * b refers to the higher numbered u_arg
546 546
  */
547 547
 #ifdef WORDS_BIGENDIAN
548
-# define ULONG_LONG(a,b) \
548
+# define ULONG_LONG(a, b) \
549 549
 	((unsigned long long)(unsigned)(b) | ((unsigned long long)(a)<<32))
550 550
 #else
551
-# define ULONG_LONG(a,b) \
551
+# define ULONG_LONG(a, b) \
552 552
 	((unsigned long long)(unsigned)(a) | ((unsigned long long)(b)<<32))
553 553
 #endif
554 554
 extern int getllval(struct tcb *, unsigned long long *, int);

+ 1
- 2
desc.c View File

@@ -164,8 +164,7 @@ decode_select(struct tcb *const tcp, const kernel_ulong_t *const args,
164 164
 						);
165 165
 						first = 0;
166 166
 						sep = ", ";
167
-					}
168
-					else {
167
+					} else {
169 168
 						outptr += sprintf(outptr, " %u", j);
170 169
 					}
171 170
 				}

+ 1
- 1
dirent.c View File

@@ -133,7 +133,7 @@ SYS_FUNC(getdents)
133 133
 				d->d_reclen);
134 134
 
135 135
 			if (print_quoted_string(d->d_name, d_name_len,
136
-					        QUOTE_0_TERMINATED) > 0) {
136
+						QUOTE_0_TERMINATED) > 0) {
137 137
 				tprints("...");
138 138
 			}
139 139
 

+ 1
- 1
dirent64.c View File

@@ -106,7 +106,7 @@ SYS_FUNC(getdents64)
106 106
 
107 107
 			tprints(", d_name=");
108 108
 			if (print_quoted_string(d->d_name, d_name_len,
109
-					        QUOTE_0_TERMINATED) > 0) {
109
+						QUOTE_0_TERMINATED) > 0) {
110 110
 				tprints("...");
111 111
 			}
112 112
 

+ 1
- 1
dm.c View File

@@ -374,7 +374,7 @@ misplaced:
374 374
 
375 375
 static void
376 376
 dm_decode_dm_target_msg(struct tcb *const tcp, const kernel_ulong_t addr,
377
-		        const struct dm_ioctl *const ioc)
377
+			const struct dm_ioctl *const ioc)
378 378
 {
379 379
 	if (ioc->data_start == ioc->data_size)
380 380
 		return;

+ 1
- 1
evdev.c View File

@@ -517,7 +517,7 @@ evdev_write_ioctl(struct tcb *const tcp, const unsigned int code,
517 517
 MPERS_PRINTER_DECL(int, evdev_ioctl, struct tcb *const tcp,
518 518
 		   const unsigned int code, const kernel_ulong_t arg)
519 519
 {
520
-	switch(_IOC_DIR(code)) {
520
+	switch (_IOC_DIR(code)) {
521 521
 		case _IOC_READ:
522 522
 			if (entering(tcp))
523 523
 				return 0;

+ 1
- 1
fetch_struct_statfs.c View File

@@ -84,7 +84,7 @@ MPERS_PRINTER_DECL(bool, fetch_struct_statfs64,
84 84
 {
85 85
 	struct_statfs64 b;
86 86
 
87
-        if (sizeof(b) != size
87
+	if (sizeof(b) != size
88 88
 #ifdef COMPAT_STATFS64_PADDED_SIZE
89 89
 	    && sizeof(b) != COMPAT_STATFS64_PADDED_SIZE
90 90
 #endif

+ 3
- 3
file_ioctl.c View File

@@ -36,11 +36,11 @@
36 36
 #endif
37 37
 
38 38
 #ifndef FICLONE
39
-# define FICLONE         _IOW(0x94, 9, int)
39
+# define FICLONE	_IOW(0x94, 9, int)
40 40
 #endif
41 41
 
42 42
 #ifndef FICLONERANGE
43
-# define FICLONERANGE    _IOW(0x94, 13, struct file_clone_range)
43
+# define FICLONERANGE	_IOW(0x94, 13, struct file_clone_range)
44 44
 struct file_clone_range {
45 45
 	int64_t src_fd;
46 46
 	uint64_t src_offset;
@@ -50,7 +50,7 @@ struct file_clone_range {
50 50
 #endif
51 51
 
52 52
 #ifndef FIDEDUPERANGE
53
-# define FIDEDUPERANGE   _IOWR(0x94, 54, struct file_dedupe_range)
53
+# define FIDEDUPERANGE	_IOWR(0x94, 54, struct file_dedupe_range)
54 54
 struct file_dedupe_range_info {
55 55
 	int64_t dest_fd;	/* in - destination file */
56 56
 	uint64_t dest_offset;	/* in - start of extent in destination */

+ 1
- 1
gcc_compat.h View File

@@ -84,7 +84,7 @@
84 84
 #if GNUC_PREREQ(4, 1)
85 85
 # define ALIGNOF(t_)	__alignof__(t_)
86 86
 #else
87
-# define ALIGNOF(t_)	(sizeof(struct {char x_; t_ y_;}) - sizeof(t_))
87
+# define ALIGNOF(t_)	(sizeof(struct { char x_; t_ y_; }) - sizeof(t_))
88 88
 #endif
89 89
 
90 90
 #if GNUC_PREREQ(4, 3)

+ 4
- 3
io.c View File

@@ -70,7 +70,7 @@ print_iovec(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
70 70
 	kernel_ulong_t iov_buf[2], len;
71 71
 	struct print_iovec_config *c = data;
72 72
 
73
-        if (elem_size < sizeof(iov_buf)) {
73
+	if (elem_size < sizeof(iov_buf)) {
74 74
 		iov_buf[0] = ((unsigned int *) elem_buf)[0];
75 75
 		iov_buf[1] = ((unsigned int *) elem_buf)[1];
76 76
 		iov = iov_buf;
@@ -118,8 +118,9 @@ tprint_iov_upto(struct tcb *const tcp, const kernel_ulong_t len,
118 118
 		const kernel_ulong_t data_size)
119 119
 {
120 120
 	kernel_ulong_t iov[2];
121
-	struct print_iovec_config config =
122
-		{ .decode_iov = decode_iov, .data_size = data_size };
121
+	struct print_iovec_config config = {
122
+		.decode_iov = decode_iov, .data_size = data_size
123
+	};
123 124
 
124 125
 	print_array(tcp, addr, len, iov, current_wordsize * 2,
125 126
 		    umoven_or_printaddr_ignore_syserror, print_iovec, &config);

+ 2
- 2
ioctlsort.c View File

@@ -56,7 +56,7 @@ is_prefix(const char *s1, const char *s2)
56 56
 }
57 57
 
58 58
 static int
59
-compare_name_info(const void* a, const void* b)
59
+compare_name_info(const void *a, const void *b)
60 60
 {
61 61
 	int rc;
62 62
 
@@ -93,7 +93,7 @@ code(const struct ioctlent *e)
93 93
 }
94 94
 
95 95
 static int
96
-compare_code_name(const void* a, const void* b)
96
+compare_code_name(const void *a, const void *b)
97 97
 {
98 98
 	unsigned int code1 = code((struct ioctlent *) a);
99 99
 	unsigned int code2 = code((struct ioctlent *) b);

+ 1
- 1
kcmp.c View File

@@ -40,7 +40,7 @@ SYS_FUNC(kcmp)
40 40
 	tprintf("%d, %d, ", pid1, pid2);
41 41
 	printxval(kcmp_types, type, "KCMP_???");
42 42
 
43
-	switch(type) {
43
+	switch (type) {
44 44
 		case KCMP_FILE:
45 45
 			tprintf(", %u, %u", (unsigned) idx1, (unsigned) idx2);
46 46
 			break;

+ 1
- 1
kexec.c View File

@@ -44,7 +44,7 @@ print_seg(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
44 44
 	const kernel_ulong_t *seg;
45 45
 	kernel_ulong_t seg_buf[4];
46 46
 
47
-        if (elem_size < sizeof(seg_buf)) {
47
+	if (elem_size < sizeof(seg_buf)) {
48 48
 		unsigned int i;
49 49
 
50 50
 		for (i = 0; i < ARRAY_SIZE(seg_buf); ++i)

+ 21
- 21
linux/aarch64/arch_regs.c View File

@@ -1,31 +1,31 @@
1 1
 struct arm_pt_regs {
2
-        uint32_t uregs[18];
2
+	uint32_t uregs[18];
3 3
 };
4
-#define ARM_cpsr       uregs[16]
5
-#define ARM_pc         uregs[15]
6
-#define ARM_lr         uregs[14]
7
-#define ARM_sp         uregs[13]
8
-#define ARM_ip         uregs[12]
9
-#define ARM_fp         uregs[11]
10
-#define ARM_r10        uregs[10]
11
-#define ARM_r9         uregs[9]
12
-#define ARM_r8         uregs[8]
13
-#define ARM_r7         uregs[7]
14
-#define ARM_r6         uregs[6]
15
-#define ARM_r5         uregs[5]
16
-#define ARM_r4         uregs[4]
17
-#define ARM_r3         uregs[3]
18
-#define ARM_r2         uregs[2]
19
-#define ARM_r1         uregs[1]
20
-#define ARM_r0         uregs[0]
21
-#define ARM_ORIG_r0    uregs[17]
4
+#define ARM_cpsr	uregs[16]
5
+#define ARM_pc		uregs[15]
6
+#define ARM_lr		uregs[14]
7
+#define ARM_sp		uregs[13]
8
+#define ARM_ip		uregs[12]
9
+#define ARM_fp		uregs[11]
10
+#define ARM_r10		uregs[10]
11
+#define ARM_r9		uregs[9]
12
+#define ARM_r8		uregs[8]
13
+#define ARM_r7		uregs[7]
14
+#define ARM_r6		uregs[6]
15
+#define ARM_r5		uregs[5]
16
+#define ARM_r4		uregs[4]
17
+#define ARM_r3		uregs[3]
18
+#define ARM_r2		uregs[2]
19
+#define ARM_r1		uregs[1]
20
+#define ARM_r0		uregs[0]
21
+#define ARM_ORIG_r0	uregs[17]
22 22
 
23 23
 static union {
24 24
 	struct user_pt_regs aarch64_r;
25 25
 	struct arm_pt_regs  arm_r;
26 26
 } arm_regs_union;
27
-#define aarch64_regs arm_regs_union.aarch64_r
28
-#define arm_regs     arm_regs_union.arm_r
27
+#define aarch64_regs	arm_regs_union.aarch64_r
28
+#define arm_regs	arm_regs_union.arm_r
29 29
 
30 30
 uint64_t *const aarch64_sp_ptr = (uint64_t *) &aarch64_regs.sp;
31 31
 uint32_t *const arm_sp_ptr = &arm_regs.ARM_sp;

+ 1
- 1
linux/arm/get_scno.c View File

@@ -58,7 +58,7 @@ arch_get_scno(struct tcb *tcp)
58 58
 		/* Fixup the syscall number */
59 59
 		scno &= 0x000fffff;
60 60
 	} else {
61
-	scno_in_r7:
61
+scno_in_r7:
62 62
 		scno = arm_regs.ARM_r7;
63 63
 	}
64 64
 #else /* __ARM_EABI__ || !ENABLE_ARM_OABI */

+ 3
- 2
linux/bfin/get_syscall_args.c View File

@@ -2,8 +2,9 @@
2 2
 static int
3 3
 get_syscall_args(struct tcb *tcp)
4 4
 {
5
-	static const int argreg[MAX_ARGS] =
6
-		{ PT_R0, PT_R1, PT_R2, PT_R3, PT_R4, PT_R5 };
5
+	static const int argreg[MAX_ARGS] = {
6
+		PT_R0, PT_R1, PT_R2, PT_R3, PT_R4, PT_R5
7
+	};
7 8
 	unsigned int i;
8 9
 
9 10
 	for (i = 0; i < tcp->s_ent->nargs; ++i)

+ 4
- 4
linux/personality.h View File

@@ -8,8 +8,8 @@
8 8
  * These occupy the top three bytes.
9 9
  */
10 10
 enum {
11
-	UNAME26	=               0x0020000,
12
-	ADDR_NO_RANDOMIZE = 	0x0040000,	/* disable randomization of VA space */
11
+	UNAME26 =		0x0020000,
12
+	ADDR_NO_RANDOMIZE =	0x0040000,	/* disable randomization of VA space */
13 13
 	FDPIC_FUNCPTRS =	0x0080000,	/* userspace function ptrs point to descriptors
14 14
 						 * (signal handling)
15 15
 						 */
@@ -19,8 +19,8 @@ enum {
19 19
 	ADDR_LIMIT_32BIT =	0x0800000,
20 20
 	SHORT_INODE =		0x1000000,
21 21
 	WHOLE_SECONDS =		0x2000000,
22
-	STICKY_TIMEOUTS	=	0x4000000,
23
-	ADDR_LIMIT_3GB = 	0x8000000,
22
+	STICKY_TIMEOUTS =	0x4000000,
23
+	ADDR_LIMIT_3GB =	0x8000000,
24 24
 };
25 25
 
26 26
 /*

+ 10
- 10
linux/sh64/arch_regs.h View File

@@ -1,15 +1,15 @@
1 1
 /* SH64 Linux - this code assumes the following kernel API for system calls:
2
-        PC           Offset 0
3
-        System Call  Offset 16 (actually, (syscall no.) | (0x1n << 16),
4
-                     where n = no. of parameters.
5
-        Other regs   Offset 24+
2
+	PC           Offset 0
3
+	System Call  Offset 16 (actually, (syscall no.) | (0x1n << 16),
4
+		     where n = no. of parameters.
5
+	Other regs   Offset 24+
6 6
 
7
-        On entry:    R2-7 = parameters 1-6 (as many as necessary)
8
-        On return:   R9   = result.
7
+	On entry:    R2-7 = parameters 1-6 (as many as necessary)
8
+	On return:   R9   = result.
9 9
 */
10 10
 
11 11
 /* Offset for peeks of registers */
12
-#define REG_OFFSET         (24)
13
-#define REG_GENERAL(x)     (8*(x)+REG_OFFSET)
14
-#define REG_PC             (0*8)
15
-#define REG_SYSCALL        (2*8)
12
+#define REG_OFFSET	(24)
13
+#define REG_GENERAL(x)	(8*(x)+REG_OFFSET)
14
+#define REG_PC		(0*8)
15
+#define REG_SYSCALL	(2*8)

+ 10
- 4
linux/x86_64/get_scno.c View File

@@ -57,7 +57,7 @@ arch_get_scno(struct tcb *tcp)
57 57
 	 * solely by looking at __X32_SYSCALL_BIT:
58 58
 	 * arch/x86/include/asm/compat.h::is_x32_task():
59 59
 	 * if (task_pt_regs(current)->orig_ax & __X32_SYSCALL_BIT)
60
-	 *         return true;
60
+	 *	return true;
61 61
 	 */
62 62
 	if (x86_io.iov_len == sizeof(i386_regs)) {
63 63
 		scno = i386_regs.orig_eax;
@@ -93,7 +93,9 @@ arch_get_scno(struct tcb *tcp)
93 93
 	 */
94 94
 	scno = x86_64_regs.orig_rax;
95 95
 	switch (x86_64_regs.cs) {
96
-		case 0x23: currpers = 1; break;
96
+		case 0x23:
97
+			currpers = 1;
98
+			break;
97 99
 		case 0x33:
98 100
 			if (x86_64_regs.ds == 0x2b) {
99 101
 				currpers = 2;
@@ -123,9 +125,13 @@ arch_get_scno(struct tcb *tcp)
123 125
 		perror_msg("ptrace_peektext failed");
124 126
 	switch (call & 0xffff) {
125 127
 		/* x86-64: syscall = 0x0f 0x05 */
126
-		case 0x050f: currpers = 0; break;
128
+		case 0x050f:
129
+			currpers = 0;
130
+			break;
127 131
 		/* i386: int 0x80 = 0xcd 0x80 */
128
-		case 0x80cd: currpers = 1; break;
132
+		case 0x80cd:
133
+			currpers = 1;
134
+			break;
129 135
 		default:
130 136
 			currpers = current_personality;
131 137
 			error_msg("Unknown syscall opcode (0x%04X) while "

+ 2
- 2
linux/x86_64/set_error.c View File

@@ -10,13 +10,13 @@ static int
10 10
 arch_set_error(struct tcb *tcp)
11 11
 {
12 12
 #ifdef HAVE_GETREGS_OLD
13
-	x86_64_regs.rax = - (long long) tcp->u_error;
13
+	x86_64_regs.rax = -(long long) tcp->u_error;
14 14
 	return upoke(tcp->pid, 8 * RAX, x86_64_regs.rax);
15 15
 #else
16 16
 	if (x86_io.iov_len == sizeof(i386_regs))
17 17
 		return i386_set_error(tcp);
18 18
 
19
-	x86_64_regs.rax = - (long long) tcp->u_error;
19
+	x86_64_regs.rax = -(long long) tcp->u_error;
20 20
 	return set_regs(tcp->pid);
21 21
 #endif
22 22
 }

+ 1
- 1
mem.c View File

@@ -331,7 +331,7 @@ SYS_FUNC(remap_file_pages)
331 331
 static bool
332 332
 print_protmap_entry(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
333 333
 {
334
-	tprintf("%#08x", * (unsigned int *) elem_buf);
334
+	tprintf("%#08x", *(unsigned int *) elem_buf);
335 335
 
336 336
 	return true;
337 337
 }

+ 1
- 1
msghdr.c View File

@@ -329,7 +329,7 @@ decode_msg_control(struct tcb *const tcp, const kernel_ulong_t addr,
329 329
 
330 330
 		print_cmsg_type_data(tcp, cmsg_level, cmsg_type,
331 331
 				     (const void *) (u.ptr + cmsg_size),
332
-				     len > cmsg_size ? len - cmsg_size: 0);
332
+				     len > cmsg_size ? len - cmsg_size : 0);
333 333
 		tprints("}");
334 334
 
335 335
 		if (len < cmsg_size) {

+ 6
- 6
numa.c View File

@@ -34,10 +34,10 @@ print_node(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
34 34
 {
35 35
 	if (elem_size < sizeof(kernel_ulong_t)) {
36 36
 		tprintf("%#0*x", (int) elem_size * 2 + 2,
37
-			* (unsigned int *) elem_buf);
37
+			*(unsigned int *) elem_buf);
38 38
 	} else {
39 39
 		tprintf("%#0*" PRI_klx, (int) elem_size * 2 + 2,
40
-			* (kernel_ulong_t *) elem_buf);
40
+			*(kernel_ulong_t *) elem_buf);
41 41
 	}
42 42
 
43 43
 	return true;
@@ -127,9 +127,9 @@ print_addr(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
127 127
 	kernel_ulong_t addr;
128 128
 
129 129
 	if (elem_size < sizeof(addr)) {
130
-		addr = * (unsigned int *) elem_buf;
130
+		addr = *(unsigned int *) elem_buf;
131 131
 	} else {
132
-		addr = * (kernel_ulong_t *) elem_buf;
132
+		addr = *(kernel_ulong_t *) elem_buf;
133 133
 	}
134 134
 
135 135
 	printaddr(addr);
@@ -140,7 +140,7 @@ print_addr(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
140 140
 static bool
141 141
 print_status(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
142 142
 {
143
-	const int status = * (int *) elem_buf;
143
+	const int status = *(int *) elem_buf;
144 144
 
145 145
 	if (status < 0 && (unsigned) -status < nerrnos)
146 146
 		tprintf("-%s", errnoent[-status]);
@@ -153,7 +153,7 @@ print_status(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
153 153
 static bool
154 154
 print_int(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
155 155
 {
156
-	tprintf("%d", * (int *) elem_buf);
156
+	tprintf("%d", *(int *) elem_buf);
157 157
 
158 158
 	return true;
159 159
 }

+ 2
- 2
open.c View File

@@ -42,7 +42,7 @@
42 42
 #define O_ACCMODE 03
43 43
 
44 44
 #ifdef O_LARGEFILE
45
-# if O_LARGEFILE == 0          /* biarch platforms in 64-bit mode */
45
+# if O_LARGEFILE == 0		/* biarch platforms in 64-bit mode */
46 46
 #  undef O_LARGEFILE
47 47
 #  ifdef SPARC64
48 48
 #   define O_LARGEFILE 0x40000
@@ -56,7 +56,7 @@
56 56
 #include "xlat/open_mode_flags.h"
57 57
 
58 58
 #ifndef AT_FDCWD
59
-# define AT_FDCWD                -100
59
+# define AT_FDCWD	-100
60 60
 #endif
61 61
 
62 62
 /* The fd is an "int", so when decoding x86 on x86_64, we need to force sign

+ 10
- 10
or1k_atomic.c View File

@@ -31,22 +31,22 @@
31 31
 
32 32
 #ifdef OR1K
33 33
 
34
-#define OR1K_ATOMIC_SWAP        1
35
-#define OR1K_ATOMIC_CMPXCHG     2
36
-#define OR1K_ATOMIC_XCHG        3
37
-#define OR1K_ATOMIC_ADD         4
38
-#define OR1K_ATOMIC_DECPOS      5
39
-#define OR1K_ATOMIC_AND         6
40
-#define OR1K_ATOMIC_OR          7
41
-#define OR1K_ATOMIC_UMAX        8
42
-#define OR1K_ATOMIC_UMIN        9
34
+#define OR1K_ATOMIC_SWAP	1
35
+#define OR1K_ATOMIC_CMPXCHG	2
36
+#define OR1K_ATOMIC_XCHG	3
37
+#define OR1K_ATOMIC_ADD		4
38
+#define OR1K_ATOMIC_DECPOS	5
39
+#define OR1K_ATOMIC_AND		6
40
+#define OR1K_ATOMIC_OR		7
41
+#define OR1K_ATOMIC_UMAX	8
42
+#define OR1K_ATOMIC_UMIN	9
43 43
 
44 44
 #include "xlat/atomic_ops.h"
45 45
 
46 46
 SYS_FUNC(or1k_atomic)
47 47
 {
48 48
 	printxval64(atomic_ops, tcp->u_arg[0], "???");
49
-	switch(tcp->u_arg[0]) {
49
+	switch (tcp->u_arg[0]) {
50 50
 	case OR1K_ATOMIC_SWAP:
51 51
 		tprintf(", 0x%lx, 0x%lx", tcp->u_arg[1], tcp->u_arg[2]);
52 52
 		break;

+ 68
- 68
perf.c View File

@@ -168,7 +168,7 @@ print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
168 168
 
169 169
 		if (use_new_size > 0)
170 170
 			printxval(perf_attr_size, new_size,
171
-			          "PERF_ATTR_SIZE_???");
171
+				  "PERF_ATTR_SIZE_???");
172 172
 		else
173 173
 			tprints("???");
174 174
 	}
@@ -176,17 +176,17 @@ print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
176 176
 	switch (attr->type) {
177 177
 	case PERF_TYPE_HARDWARE:
178 178
 		PRINT_XLAT(", config=", perf_hw_id, attr->config,
179
-		           "PERF_COUNT_HW_???");
179
+			   "PERF_COUNT_HW_???");
180 180
 		break;
181 181
 	case PERF_TYPE_SOFTWARE:
182 182
 		PRINT_XLAT(", config=", perf_sw_ids, attr->config,
183
-		           "PERF_COUNT_SW_???");
183
+			   "PERF_COUNT_SW_???");
184 184
 		break;
185 185
 	case PERF_TYPE_TRACEPOINT:
186 186
 		/*
187 187
 		 * "The value to use in config can be obtained from under
188
-		 * debugfs tracing/events/../../id if ftrace is enabled in the
189
-                 * kernel."
188
+		 * debugfs tracing/events/../../id if ftrace is enabled
189
+		 * in the kernel."
190 190
 		 */
191 191
 		tprintf(", config=%" PRIu64, attr->config);
192 192
 		break;
@@ -196,9 +196,9 @@ print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
196 196
 		 * (perf_hw_cache_op_result_id << 16)
197 197
 		 */
198 198
 		PRINT_XLAT(", config=", perf_hw_cache_id, attr->config & 0xFF,
199
-		           "PERF_COUNT_HW_CACHE_???");
199
+			   "PERF_COUNT_HW_CACHE_???");
200 200
 		PRINT_XLAT("|", perf_hw_cache_op_id, (attr->config >> 8) & 0xFF,
201
-		           "PERF_COUNT_HW_CACHE_OP_???");
201
+			   "PERF_COUNT_HW_CACHE_OP_???");
202 202
 		/*
203 203
 		 * Current code (see set_ext_hw_attr in arch/x86/events/core.c,
204 204
 		 * tile_map_cache_event in arch/tile/kernel/perf_event.c,
@@ -215,8 +215,8 @@ print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
215 215
 		 * that cache result is 8 bits in size.
216 216
 		 */
217 217
 		PRINT_XLAT("<<8|", perf_hw_cache_op_result_id,
218
-		           (attr->config >> 16) & 0xFF,
219
-		           "PERF_COUNT_HW_CACHE_RESULT_???");
218
+			   (attr->config >> 16) & 0xFF,
219
+			   "PERF_COUNT_HW_CACHE_RESULT_???");
220 220
 		tprints("<<16");
221 221
 		if (attr->config >> 24) {
222 222
 			tprintf("|%#" PRIx64 "<<24", attr->config >> 24);
@@ -262,60 +262,60 @@ print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
262 262
 		"PERF_FORMAT_???");
263 263
 
264 264
 	tprintf(", disabled=%u"
265
-	        ", inherit=%u"
266
-	        ", pinned=%u"
267
-	        ", exclusive=%u"
268
-	        ", exclusive_user=%u"
269
-	        ", exclude_kernel=%u"
270
-	        ", exclude_hv=%u"
271
-	        ", exclude_idle=%u"
272
-	        ", mmap=%u"
273
-	        ", comm=%u"
274
-	        ", freq=%u"
275
-	        ", inherit_stat=%u"
276
-	        ", enable_on_exec=%u"
277
-	        ", task=%u"
278
-	        ", watermark=%u"
279
-	        ", precise_ip=%u",
280
-	        attr->disabled,
281
-	        attr->inherit,
282
-	        attr->pinned,
283
-	        attr->exclusive,
284
-	        attr->exclude_user,
285
-	        attr->exclude_kernel,
286
-	        attr->exclude_hv,
287
-	        attr->exclude_idle,
288
-	        attr->mmap,
289
-	        attr->comm,
290
-	        attr->freq,
291
-	        attr->inherit_stat,
292
-	        attr->enable_on_exec,
293
-	        attr->task,
294
-	        attr->watermark,
295
-	        attr->precise_ip);
265
+		", inherit=%u"
266
+		", pinned=%u"
267
+		", exclusive=%u"
268
+		", exclusive_user=%u"
269
+		", exclude_kernel=%u"
270
+		", exclude_hv=%u"
271
+		", exclude_idle=%u"
272
+		", mmap=%u"
273
+		", comm=%u"
274
+		", freq=%u"
275
+		", inherit_stat=%u"
276
+		", enable_on_exec=%u"
277
+		", task=%u"
278
+		", watermark=%u"
279
+		", precise_ip=%u",
280
+		attr->disabled,
281
+		attr->inherit,
282
+		attr->pinned,
283
+		attr->exclusive,
284
+		attr->exclude_user,
285
+		attr->exclude_kernel,
286
+		attr->exclude_hv,
287
+		attr->exclude_idle,
288
+		attr->mmap,
289
+		attr->comm,
290
+		attr->freq,
291
+		attr->inherit_stat,
292
+		attr->enable_on_exec,
293
+		attr->task,
294
+		attr->watermark,
295
+		attr->precise_ip);
296 296
 	tprints_comment(precise_ip_desc[attr->precise_ip]);
297 297
 	tprintf(", mmap_data=%u"
298
-	        ", sample_id_all=%u"
299
-	        ", exclude_host=%u"
300
-	        ", exclude_guest=%u"
301
-	        ", exclude_callchain_kernel=%u"
302
-	        ", exclude_callchain_user=%u"
303
-	        ", mmap2=%u"
304
-	        ", comm_exec=%u"
305
-	        ", use_clockid=%u"
306
-	        ", context_switch=%u"
307
-	        ", write_backward=%u",
308
-	        attr->mmap_data,
309
-	        attr->sample_id_all,
310
-	        attr->exclude_host,
311
-	        attr->exclude_guest,
312
-	        attr->exclude_callchain_kernel,
313
-	        attr->exclude_callchain_user,
314
-	        attr->mmap2,
315
-	        attr->comm_exec,
316
-	        attr->use_clockid,
317
-	        attr->context_switch,
318
-	        attr->write_backward);
298
+		", sample_id_all=%u"
299
+		", exclude_host=%u"
300
+		", exclude_guest=%u"
301
+		", exclude_callchain_kernel=%u"
302
+		", exclude_callchain_user=%u"
303
+		", mmap2=%u"
304
+		", comm_exec=%u"
305
+		", use_clockid=%u"
306
+		", context_switch=%u"
307
+		", write_backward=%u",
308
+		attr->mmap_data,
309
+		attr->sample_id_all,
310
+		attr->exclude_host,
311
+		attr->exclude_guest,
312
+		attr->exclude_callchain_kernel,
313
+		attr->exclude_callchain_user,
314
+		attr->mmap2,
315
+		attr->comm_exec,
316
+		attr->use_clockid,
317
+		attr->context_switch,
318
+		attr->write_backward);
319 319
 
320 320
 	/*
321 321
 	 * Print it only in case it is non-zero, since it may contain flags we
@@ -323,7 +323,7 @@ print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
323 323
 	 */
324 324
 	if (attr->__reserved_1) {
325 325
 		tprintf(", __reserved_1=%#" PRIx64,
326
-		        (uint64_t) attr->__reserved_1);
326
+			(uint64_t) attr->__reserved_1);
327 327
 		tprints_comment("Bits 63..28");
328 328
 	}
329 329
 
@@ -335,10 +335,10 @@ print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
335 335
 	if (attr->type == PERF_TYPE_BREAKPOINT)
336 336
 		/* Any combination of R/W with X is deemed invalid */
337 337
 		PRINT_XLAT(", bp_type=", hw_breakpoint_type, attr->bp_type,
338
-		           (attr->bp_type <=
339
-		                   (HW_BREAKPOINT_X | HW_BREAKPOINT_RW)) ?
340
-		                           "HW_BREAKPOINT_INVALID" :
341
-		                           "HW_BREAKPOINT_???");
338
+			   (attr->bp_type <=
339
+				   (HW_BREAKPOINT_X | HW_BREAKPOINT_RW)) ?
340
+					   "HW_BREAKPOINT_INVALID" :
341
+					   "HW_BREAKPOINT_???");
342 342
 
343 343
 	if (attr->type == PERF_TYPE_BREAKPOINT)
344 344
 		tprintf(", bp_addr=%#" PRIx64, attr->bp_addr);
@@ -360,7 +360,7 @@ print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
360 360
 	if (attr->sample_type & PERF_SAMPLE_BRANCH_STACK) {
361 361
 		tprints(", branch_sample_type=");
362 362
 		printflags64(perf_branch_sample_type, attr->branch_sample_type,
363
-		             "PERF_SAMPLE_BRANCH_???");
363
+			     "PERF_SAMPLE_BRANCH_???");
364 364
 	}
365 365
 
366 366
 	_PERF_CHECK_FIELD(sample_regs_user);
@@ -379,7 +379,7 @@ print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr)
379 379
 	 */
380 380
 	if (attr->sample_type & PERF_SAMPLE_STACK_USER)
381 381
 		tprintf(", sample_stack_user=%#" PRIx32,
382
-		        attr->sample_stack_user);
382
+			attr->sample_stack_user);
383 383
 
384 384
 	if (attr->use_clockid) {
385 385
 		_PERF_CHECK_FIELD(clockid);

+ 28
- 28
perf_event_struct.h View File

@@ -13,34 +13,34 @@ struct perf_event_attr {
13 13
 	};
14 14
 	uint64_t sample_type;
15 15
 	uint64_t read_format;
16
-	uint64_t disabled                 :1,
17
-	         inherit                  :1,
18
-		 pinned                   :1,
19
-		 exclusive                :1,
20
-	         exclude_user             :1,
21
-	         exclude_kernel           :1,
22
-	         exclude_hv               :1,
23
-	         exclude_idle             :1,
24
-	         mmap                     :1,
25
-	         comm                     :1,
26
-	         freq                     :1,
27
-	         inherit_stat             :1,
28
-	         enable_on_exec           :1,
29
-	         task                     :1,
30
-	         watermark                :1,
31
-	         precise_ip               :2,
32
-	         mmap_data                :1,
33
-	         sample_id_all            :1,
34
-	         exclude_host             :1,
35
-	         exclude_guest            :1,
36
-	         exclude_callchain_kernel :1,
37
-	         exclude_callchain_user   :1,
38
-	         mmap2                    :1,
39
-	         comm_exec                :1,
40
-	         use_clockid              :1,
41
-	         context_switch           :1,
42
-	         write_backward           :1,
43
-	         __reserved_1             :36;
16
+	uint64_t disabled			:1,
17
+		 inherit			:1,
18
+		 pinned				:1,
19
+		 exclusive			:1,
20
+		 exclude_user			:1,
21
+		 exclude_kernel			:1,
22
+		 exclude_hv			:1,
23
+		 exclude_idle			:1,
24
+		 mmap				:1,
25
+		 comm				:1,
26
+		 freq				:1,
27
+		 inherit_stat			:1,
28
+		 enable_on_exec			:1,
29
+		 task				:1,
30
+		 watermark			:1,
31
+		 precise_ip			:2,
32
+		 mmap_data			:1,
33
+		 sample_id_all			:1,
34
+		 exclude_host			:1,
35
+		 exclude_guest			:1,
36
+		 exclude_callchain_kernel	:1,
37
+		 exclude_callchain_user		:1,
38
+		 mmap2				:1,
39
+		 comm_exec			:1,
40
+		 use_clockid			:1,
41
+		 context_switch			:1,
42
+		 write_backward			:1,
43
+		 __reserved_1			:36;
44 44
 	union {
45 45
 		uint32_t wakeup_events;
46 46
 		uint32_t wakeup_watermark;

+ 1
- 1
qualify.c View File

@@ -436,7 +436,7 @@ parse_inject_token(const char *const token, struct inject_opts *const fopts,
436 436
 
437 437
 	if ((val = STR_STRIP_PREFIX(token, "when=")) != token) {
438 438
 		/*
439
-		 * 	== 1+1
439
+		 *	== 1+1
440 440
 		 * F	== F+0
441 441
 		 * F+	== F+1
442 442
 		 * F+S

+ 5
- 10
quota.c View File

@@ -55,8 +55,7 @@
55 55
  * leads to problems when it is used on 32-bit tracee which does not have such
56 56
  * padding.
57 57
  */
58
-struct if_dqblk
59
-{
58
+struct if_dqblk {
60 59
 	uint64_t dqb_bhardlimit;
61 60
 	uint64_t dqb_bsoftlimit;
62 61
 	uint64_t dqb_curspace;
@@ -81,8 +80,7 @@ struct if_nextdqblk {
81 80
 	uint32_t dqb_id;
82 81
 };
83 82
 
84
-struct xfs_dqblk
85
-{
83
+struct xfs_dqblk {
86 84
 	int8_t  d_version;		/* version of this structure */
87 85
 	int8_t  d_flags;		/* XFS_{USER,PROJ,GROUP}_QUOTA */
88 86
 	uint16_t d_fieldmask;		/* field specifier */
@@ -107,23 +105,20 @@ struct xfs_dqblk
107 105
 	char    d_padding4[8];		/* yet more padding */
108 106
 };
109 107
 
110
-struct if_dqinfo
111
-{
108
+struct if_dqinfo {
112 109
 	uint64_t dqi_bgrace;
113 110
 	uint64_t dqi_igrace;
114 111
 	uint32_t dqi_flags;
115 112
 	uint32_t dqi_valid;
116 113
 };
117 114
 
118
-typedef struct fs_qfilestat
119
-{
115
+typedef struct fs_qfilestat {
120 116
 	uint64_t qfs_ino;	/* inode number */
121 117
 	uint64_t qfs_nblks;	/* number of BBs 512-byte-blks */
122 118
 	uint32_t qfs_nextents;	/* number of extents */
123 119
 } fs_qfilestat_t;
124 120
 
125
-struct xfs_dqstats
126
-{
121
+struct xfs_dqstats {
127 122
 	int8_t  qs_version;		/* version number for future changes */
128 123
 	uint16_t qs_flags;		/* XFS_QUOTA_{U,P,G}DQ_{ACCT,ENFD} */
129 124
 	int8_t  qs_pad;			/* unused */

+ 3
- 6
resource.c View File

@@ -120,8 +120,7 @@ SYS_FUNC(getrlimit)
120 120
 	if (entering(tcp)) {
121 121
 		printxval(resources, tcp->u_arg[0], "RLIMIT_???");
122 122
 		tprints(", ");
123
-	}
124
-	else {
123
+	} else {
125 124
 		decode_rlimit(tcp, tcp->u_arg[1]);
126 125
 	}
127 126
 	return 0;
@@ -157,8 +156,7 @@ SYS_FUNC(getrusage)
157 156
 	if (entering(tcp)) {
158 157
 		printxval(usagewho, tcp->u_arg[0], "RUSAGE_???");
159 158
 		tprints(", ");
160
-	}
161
-	else
159
+	} else
162 160
 		printrusage(tcp, tcp->u_arg[1]);
163 161
 	return 0;
164 162
 }
@@ -169,8 +167,7 @@ SYS_FUNC(osf_getrusage)
169 167
 	if (entering(tcp)) {
170 168
 		printxval(usagewho, tcp->u_arg[0], "RUSAGE_???");
171 169
 		tprints(", ");
172
-	}
173
-	else
170
+	} else
174 171
 		printrusage32(tcp, tcp->u_arg[1]);
175 172
 	return 0;
176 173
 }

+ 6
- 12
signal.c View File

@@ -289,8 +289,7 @@ SYS_FUNC(ssetmask)
289 289
 {
290 290
 	if (entering(tcp)) {
291 291
 		tprint_old_sigmask_val("", (unsigned) tcp->u_arg[0]);
292
-	}
293
-	else if (!syserror(tcp)) {
292
+	} else if (!syserror(tcp)) {
294 293
 		tcp->auxstr = sprint_old_sigmask_val("old mask ",
295 294
 						     (unsigned) tcp->u_rval);
296 295
 		return RVAL_HEX | RVAL_STR;
@@ -433,8 +432,7 @@ SYS_FUNC(osf_sigprocmask)
433 432
 	if (entering(tcp)) {
434 433
 		printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???");
435 434
 		tprintsigmask_val(", ", tcp->u_arg[1]);
436
-	}
437
-	else if (!syserror(tcp)) {
435
+	} else if (!syserror(tcp)) {
438 436
 		tcp->auxstr = sprintsigmask_val("old mask ", tcp->u_rval);
439 437
 		return RVAL_HEX | RVAL_STR;
440 438
 	}
@@ -451,8 +449,7 @@ SYS_FUNC(sigprocmask)
451 449
 		tprints(", ");
452 450
 		print_sigset_addr_len(tcp, tcp->u_arg[1], current_wordsize);
453 451
 		tprints(", ");
454
-	}
455
-	else {
452
+	} else {
456 453
 		print_sigset_addr_len(tcp, tcp->u_arg[2], current_wordsize);
457 454
 	}
458 455
 	return 0;
@@ -493,8 +490,7 @@ SYS_FUNC(rt_sigprocmask)
493 490
 		tprints(", ");
494 491
 		print_sigset_addr_len(tcp, tcp->u_arg[1], tcp->u_arg[3]);
495 492
 		tprints(", ");
496
-	}
497
-	else {
493
+	} else {
498 494
 		print_sigset_addr_len(tcp, tcp->u_arg[2], tcp->u_arg[3]);
499 495
 		tprintf(", %" PRI_klu, tcp->u_arg[3]);
500 496
 	}
@@ -502,8 +498,7 @@ SYS_FUNC(rt_sigprocmask)
502 498
 }
503 499
 
504 500
 /* Structure describing the action to be taken when a signal arrives.  */
505
-struct new_sigaction
506
-{
501
+struct new_sigaction {
507 502
 	/* sa_handler may be a libc #define, need to use other name: */
508 503
 #ifdef MIPS
509 504
 	unsigned int sa_flags;
@@ -519,8 +514,7 @@ struct new_sigaction
519 514
 	unsigned long sa_mask[NSIG / sizeof(long)];
520 515
 };
521 516
 /* Same for i386-on-x86_64 and similar cases */
522
-struct new_sigaction32
523
-{
517
+struct new_sigaction32 {
524 518
 	uint32_t sa_handler__;
525 519
 	uint32_t sa_flags;
526 520
 #if HAVE_SA_RESTORER

+ 2
- 2
socketutils.c View File

@@ -147,7 +147,7 @@ inet_parse_response(const void *const data, const int data_len,
147 147
 	if (diag_msg->idiag_inode != inode)
148 148
 		return 0;
149 149
 
150
-	switch(diag_msg->idiag_family) {
150
+	switch (diag_msg->idiag_family) {
151 151
 		case AF_INET:
152 152
 			addr_size = sizeof(struct in_addr);
153 153
 			text_size = INET_ADDRSTRLEN;
@@ -536,7 +536,7 @@ get_sockaddr_by_inode(struct tcb *const tcp, const int fd,
536 536
 /* Given an inode number of a socket, print out its protocol details.  */
537 537
 bool
538 538
 print_sockaddr_by_inode(struct tcb *const tcp, const int fd,
539
-		        const unsigned long inode)
539
+			const unsigned long inode)
540 540
 {
541 541
 	return print_sockaddr_by_inode_cached(inode) ? true :
542 542
 		print_sockaddr_by_inode_uncached(inode, getfdproto(tcp, fd));

+ 2
- 2
statx.h View File

@@ -40,7 +40,7 @@ typedef struct {
40 40
 	uint32_t stx_mask; /* What results were written [uncond] */
41 41
 	uint32_t stx_blksize; /* Preferred general I/O size [uncond] */
42 42
 	uint64_t stx_attributes; /* Flags conveying information about the file
43
-	                            [uncond] */
43
+				    [uncond] */
44 44
 
45 45
 	uint32_t stx_nlink; /* Number of hard links */
46 46
 	uint32_t stx_uid; /* User ID of owner */
@@ -52,7 +52,7 @@ typedef struct {
52 52
 	uint64_t stx_size; /* File size */
53 53
 	uint64_t stx_blocks; /* Number of 512-byte blocks allocated */
54 54
 	uint64_t stx_attributes_mask; /* Mask to show what's supported in
55
-	                                 stx_attributes */
55
+					 stx_attributes */
56 56
 
57 57
 	struct_statx_timestamp stx_atime; /* Last access time */
58 58
 	struct_statx_timestamp stx_btime; /* File creation time */

+ 19
- 28
strace.c View File

@@ -89,12 +89,12 @@ static bool print_pid_pfx;
89 89
 
90 90
 /* -I n */
91 91
 enum {
92
-    INTR_NOT_SET        = 0,
93
-    INTR_ANYWHERE       = 1, /* don't block/ignore any signals */
94
-    INTR_WHILE_WAIT     = 2, /* block fatal signals while decoding syscall. default */
95
-    INTR_NEVER          = 3, /* block fatal signals. default if '-o FILE PROG' */
96
-    INTR_BLOCK_TSTP_TOO = 4, /* block fatal signals and SIGTSTP (^Z) */
97
-    NUM_INTR_OPTS
92
+	INTR_NOT_SET        = 0,
93
+	INTR_ANYWHERE       = 1, /* don't block/ignore any signals */
94
+	INTR_WHILE_WAIT     = 2, /* block fatal signals while decoding syscall. default */
95
+	INTR_NEVER          = 3, /* block fatal signals. default if '-o FILE PROG' */
96
+	INTR_BLOCK_TSTP_TOO = 4, /* block fatal signals and SIGTSTP (^Z) */
97
+	NUM_INTR_OPTS
98 98
 };
99 99
 static int opt_intr;
100 100
 /* We play with signal mask only if this mode is active: */
@@ -690,12 +690,10 @@ printleader(struct tcb *tcp)
690 690
 			tprintf("%6ld.%06ld ",
691 691
 				(long) dtv.tv_sec, (long) dtv.tv_usec);
692 692
 			otv = tv;
693
-		}
694
-		else if (tflag > 2) {
693
+		} else if (tflag > 2) {
695 694
 			tprintf("%ld.%06ld ",
696 695
 				(long) tv.tv_sec, (long) tv.tv_usec);
697
-		}
698
-		else {
696
+		} else {
699 697
 			time_t local = tv.tv_sec;
700 698
 			strftime(str, sizeof(str), "%T", localtime(&local));
701 699
 			if (tflag > 1)
@@ -919,8 +917,7 @@ detach(struct tcb *tcp)
919 917
 			goto wait_loop;
920 918
 		if (errno != ESRCH)
921 919
 			perror_msg("detach: ptrace(PTRACE_INTERRUPT,%u)", tcp->pid);
922
-	}
923
-	else {
920
+	} else {
924 921
 		error = my_tkill(tcp->pid, SIGSTOP);
925 922
 		if (!error)
926 923
 			goto wait_loop;
@@ -1032,7 +1029,7 @@ process_opt_p_list(char *opt)
1032 1029
 		 * pidof uses space as delim, pgrep uses newline. :(
1033 1030
 		 */
1034 1031
 		int pid;
1035
-		char *delim = opt + strcspn(opt, ", \n\t");
1032
+		char *delim = opt + strcspn(opt, "\n\t ,");
1036 1033
 		char c = *delim;
1037 1034
 
1038 1035
 		*delim = '\0';
@@ -1231,8 +1228,7 @@ exec_or_die(void)
1231 1228
 		if (setreuid(run_uid, params->run_euid) < 0) {
1232 1229
 			perror_msg_and_die("setreuid");
1233 1230
 		}
1234
-	}
1235
-	else if (geteuid() != 0)
1231
+	} else if (geteuid() != 0)
1236 1232
 		if (setreuid(run_uid, run_uid) < 0) {
1237 1233
 			perror_msg_and_die("setreuid");
1238 1234
 		}
@@ -1364,15 +1360,13 @@ startup_child(char **argv)
1364 1360
 			if (colon) {
1365 1361
 				n = colon - path;
1366 1362
 				m = n + 1;
1367
-			}
1368
-			else
1363
+			} else
1369 1364
 				m = n = strlen(path);
1370 1365
 			if (n == 0) {
1371 1366
 				if (!getcwd(pathname, PATH_MAX))
1372 1367
 					continue;
1373 1368
 				len = strlen(pathname);
1374
-			}
1375
-			else if (n > sizeof(pathname) - 1)
1369
+			} else if (n > sizeof(pathname) - 1)
1376 1370
 				continue;
1377 1371
 			else {
1378 1372
 				strncpy(pathname, path, n);
@@ -1466,8 +1460,7 @@ startup_child(char **argv)
1466 1460
 			    | TCB_SKIP_DETACH_ON_FIRST_EXEC
1467 1461
 			    | (NOMMU_SYSTEM ? 0 : (TCB_HIDE_LOG | post_attach_sigstop));
1468 1462
 		newoutf(tcp);
1469
-	}
1470
-	else {
1463
+	} else {
1471 1464
 		/* With -D, we are *child* here, the tracee is our parent. */
1472 1465
 		strace_child = strace_tracer_pid;
1473 1466
 		strace_tracer_pid = getpid();
@@ -1582,12 +1575,12 @@ get_os_release(void)
1582 1575
 			error_msg_and_die("Bad OS release string: '%s'", u.release);
1583 1576
 		/* Note: this open-codes KERNEL_VERSION(): */
1584 1577
 		rel = (rel << 8) | atoi(p);
1585
-		if (rel >= KERNEL_VERSION(1,0,0))
1578
+		if (rel >= KERNEL_VERSION(1, 0, 0))
1586 1579
 			break;
1587 1580
 		while (*p >= '0' && *p <= '9')
1588 1581
 			p++;
1589 1582
 		if (*p != '.') {
1590
-			if (rel >= KERNEL_VERSION(0,1,0)) {
1583
+			if (rel >= KERNEL_VERSION(0, 1, 0)) {
1591 1584
 				/* "X.Y-something" means "X.Y.0" */
1592 1585
 				rel <<= 8;
1593 1586
 				break;
@@ -1847,8 +1840,7 @@ init(int argc, char *argv[])
1847 1840
 		}
1848 1841
 		run_uid = pent->pw_uid;
1849 1842
 		run_gid = pent->pw_gid;
1850
-	}
1851
-	else {
1843
+	} else {
1852 1844
 		run_uid = getuid();
1853 1845
 		run_gid = getgid();
1854 1846
 	}
@@ -1885,8 +1877,7 @@ init(int argc, char *argv[])
1885 1877
 			if (followfork >= 2)
1886 1878
 				error_msg_and_help("piping the output and -ff are mutually exclusive");
1887 1879
 			shared_log = strace_popen(outfname + 1);
1888
-		}
1889
-		else if (followfork < 2)
1880
+		} else if (followfork < 2)
1890 1881
 			shared_log = strace_fopen(outfname);
1891 1882
 	} else {
1892 1883
 		/* -ff without -o FILE is the same as single -f */
@@ -2563,7 +2554,7 @@ dispatch_event(enum trace_event ret, int *pstatus, siginfo_t *si)
2563 2554
 		 * PTRACE_GETEVENTMSG returns old pid starting from Linux 3.0.
2564 2555
 		 * On 2.6 and earlier, it can return garbage.
2565 2556
 		 */
2566
-		if (os_release >= KERNEL_VERSION(3,0,0))
2557
+		if (os_release >= KERNEL_VERSION(3, 0, 0))
2567 2558
 			current_tcp = maybe_switch_tcbs(current_tcp, current_tcp->pid);
2568 2559
 
2569 2560
 		if (detach_on_execve) {

+ 4
- 7
syscall.c View File

@@ -872,8 +872,7 @@ syscall_exiting_trace(struct tcb *tcp, struct timeval tv, int res)
872 872
 		}
873 873
 		if (syscall_tampered(tcp))
874 874
 			tprints(" (INJECTED)");
875
-	}
876
-	else if (!(sys_res & RVAL_NONE) && u_error) {
875
+	} else if (!(sys_res & RVAL_NONE) && u_error) {
877 876
 		const char *u_error_str;
878 877
 
879 878
 		switch (u_error) {
@@ -944,8 +943,7 @@ syscall_exiting_trace(struct tcb *tcp, struct timeval tv, int res)
944 943
 			tprints(" (INJECTED)");
945 944
 		if ((sys_res & RVAL_STR) && tcp->auxstr)
946 945
 			tprintf(" (%s)", tcp->auxstr);
947
-	}
948
-	else {
946
+	} else {
949 947
 		if (sys_res & RVAL_NONE)
950 948
 			tprints("= ?");
951 949
 		else {
@@ -983,8 +981,7 @@ syscall_exiting_trace(struct tcb *tcp, struct timeval tv, int res)
983 981
 				if (show_fd_path) {
984 982
 					tprints("= ");
985 983
 					printfd(tcp, tcp->u_rval);
986
-				}
987
-				else
984
+				} else
988 985
 					tprintf("= %" PRI_kld, tcp->u_rval);
989 986
 				break;
990 987
 			default:
@@ -1325,5 +1322,5 @@ syscall_name(kernel_ulong_t scno)
1325 1322
 	if (current_personality == X32_PERSONALITY_NUMBER)
1326 1323
 		scno &= ~__X32_SYSCALL_BIT;
1327 1324
 #endif
1328
-	return scno_is_valid(scno) ? sysent[scno].sys_name: NULL;
1325
+	return scno_is_valid(scno) ? sysent[scno].sys_name : NULL;
1329 1326
 }

+ 1
- 1
sysctl.c View File

@@ -155,7 +155,7 @@ SYS_FUNC(sysctl)
155 155
 		default:
156 156
 			goto out;
157 157
 		}
158
-	out:
158
+out:
159 159
 		max_cnt = info.nlen;
160 160
 		if (abbrev(tcp) && max_cnt > max_strlen)
161 161
 			max_cnt = max_strlen;

+ 1
- 1
test/clone.c View File

@@ -6,7 +6,7 @@
6 6
 #include <sched.h>
7 7
 #include <unistd.h>
8 8
 
9
-int child(void* arg)
9
+int child(void *arg)
10 10
 {
11 11
 	write(1, "clone\n", 6);
12 12
 	return 0;

+ 1
- 1
test/seccomp.c View File

@@ -32,7 +32,7 @@
32 32
 
33 33
 static const struct sock_filter filter[] = {
34 34
 	/* load architecture */
35
-	BPF_STMT(BPF_LD | BPF_W | BPF_ABS, (offsetof (struct seccomp_data, arch))),
35
+	BPF_STMT(BPF_LD | BPF_W | BPF_ABS, offsetof(struct seccomp_data, arch)),
36 36
 	/* jump forward 1 instruction if architecture matches */
37 37
 	BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, SECCOMP_ARCH, 1, 0),
38 38
 	/* kill process */

+ 15
- 8
test/threaded_execve.c View File

@@ -56,10 +56,10 @@ extern int __clone2(int (*fn) (void *), void *child_stack_base,
56 56
 #define clone2 __clone2
57 57
 #elif defined(__metag__)
58 58
 #define clone2(func, stack_base, size, flags, arg...) \
59
-        clone(func, stack_base, flags, arg)
59
+	clone(func, stack_base, flags, arg)
60 60
 #else
61 61
 #define clone2(func, stack_base, size, flags, arg...) \
62
-        clone(func, (stack_base) + (size), flags, arg)
62
+	clone(func, (stack_base) + (size), flags, arg)
63 63
 #endif
64 64
 /* Direct calls to syscalls, avoiding libc wrappers */
65 65
 #define syscall_tgkill(pid, tid, sig) syscall(__NR_tgkill, (pid), (tid), (sig))
@@ -74,7 +74,8 @@ static int
74 74
 thread1(void *unused)
75 75
 {
76 76
 	write(1, "1", 1);
77
-	for(;;) pause();
77
+	for (;;)
78
+		pause();
78 79
 	return 0;
79 80
 }
80 81
 
@@ -89,7 +90,8 @@ thread2(void *unused)
89 90
 	execl("/proc/self/exe", "exe", "exe", buf, NULL);
90 91
 	/* So fall back to resolved name */
91 92
 	execl(my_name, "exe", "exe", buf, NULL);
92
-	for(;;) pause();
93
+	for (;;)
94
+		pause();
93 95
 	return 0;
94 96
 }
95 97
 
@@ -119,9 +121,14 @@ thread_leader(void)
119 121
 
120 122
 	/* Various states leader can be while other thread execve's: */
121 123
 	switch (leader_final_action % 3) {
122
-		case 0: syscall_exit(42); /* leader is dead */
123
-		case 1: for(;;) pause(); /* leader is in syscall */
124
-		default: for(;;) continue; /* leader is in userspace */
124
+		case 0:
125
+			syscall_exit(42); /* leader is dead */
126
+		case 1:
127
+			for (;;)
128
+				pause(); /* leader is in syscall */
129
+		default:
130
+			for (;;)
131
+				continue; /* leader is in userspace */
125 132
 	}
126 133
 }
127 134
 
@@ -143,5 +150,5 @@ main(int argc, char **argv)
143 150
 	alarm(argv[1] ? atoi(argv[1]) : 1);
144 151
 	thread_leader();
145 152
 
146
-        return 0;
153
+	return 0;
147 154
 }

+ 1
- 2
tests/add_key.c View File

@@ -70,8 +70,7 @@ main(void)
70 70
 {
71 71
 	static const char unterminated1[] = { '\1', '\2', '\3', '\4', '\5' };
72 72
 	static const char unterminated2[] = { '\6', '\7', '\10', '\11', '\12' };
73
-	static const char unterminated3[] =
74
-		{ '\16', '\17', '\20', '\21', '\22' };
73
+	static const char unterminated3[] = { '\16', '\17', '\20', '\21', '\22' };
75 74
 
76 75
 	char *bogus_type = tail_memdup(unterminated1, sizeof(unterminated1));
77 76
 	char *bogus_desc = tail_memdup(unterminated2, sizeof(unterminated2));

+ 13
- 13
tests/aio.c View File

@@ -240,9 +240,9 @@ main(void)
240 240
 		perror_msg_and_skip("io_submit");
241 241
 	printf("io_submit(%#lx, %u, ["
242 242
 	       "{data=%#" PRI__x64 ", pread, reqprio=11, fildes=0, "
243
-	               "buf=%p, nbytes=%u, offset=%" PRI__d64 "}, "
243
+		"buf=%p, nbytes=%u, offset=%" PRI__d64 "}, "
244 244
 	       "{data=%#" PRI__x64 ", pread, reqprio=22, fildes=0, "
245
-	               "buf=%p, nbytes=%u, offset=%" PRI__d64 "}"
245
+		"buf=%p, nbytes=%u, offset=%" PRI__d64 "}"
246 246
 	       "]) = %s\n",
247 247
 	       *ctx, nr,
248 248
 	       cb[0].aio_data, data0, sizeof_data0, cb[0].aio_offset,
@@ -317,18 +317,18 @@ main(void)
317 317
 	printf("io_submit(%#lx, %ld, ["
318 318
 	       "{data=%#" PRI__x64 ", key=%u, %hu /* SUB_??? */, fildes=%d}, "
319 319
 	       "{key=%u, pwrite, reqprio=%hd, fildes=%d, str=NULL"
320
-	               ", nbytes=%" PRI__u64 ", offset=%" PRI__d64
320
+		", nbytes=%" PRI__u64 ", offset=%" PRI__d64
321 321
 # ifdef IOCB_FLAG_RESFD
322
-	               ", resfd=%d, flags=%#x"
322
+		", resfd=%d, flags=%#x"
323 323
 # endif
324
-	               "}, "
324
+		"}, "
325 325
 	       "{key=%u, pwrite, reqprio=%hd, fildes=%d, buf=%#" PRI__x64
326
-	               ", nbytes=%" PRI__u64 ", offset=%" PRI__d64 "}, "
326
+		", nbytes=%" PRI__u64 ", offset=%" PRI__d64 "}, "
327 327
 	       "{key=%u, pwrite, reqprio=%hd, fildes=%d"
328
-	               ", str=\"\\0\\1\\2\\3%.28s\"..."
329
-	               ", nbytes=%" PRI__u64 ", offset=%" PRI__d64 "}, "
328
+		", str=\"\\0\\1\\2\\3%.28s\"..."
329
+		", nbytes=%" PRI__u64 ", offset=%" PRI__d64 "}, "
330 330
 	       "{key=%u, pwritev, reqprio=%hd, fildes=%d, buf=%#" PRI__x64
331
-	               ", nbytes=%" PRI__u64 ", offset=%" PRI__d64 "}"
331
+		", nbytes=%" PRI__u64 ", offset=%" PRI__d64 "}"
332 332
 	       ", {NULL}, {%#lx}, %p]) = %s\n",
333 333
 	       *ctx, 1057L,
334 334
 	       cbv2[0].aio_data, cbv2[0].aio_key,
@@ -351,11 +351,11 @@ main(void)
351 351
 		perror_msg_and_skip("io_submit");
352 352
 	printf("io_submit(%#lx, %u, ["
353 353
 	       "{data=%#" PRI__x64 ", preadv, reqprio=%hd, fildes=0, "
354
-	               "iovec=[{iov_base=%p, iov_len=%u}"
355
-	               ", {iov_base=%p, iov_len=%u}], offset=%" PRI__d64 "}, "
354
+		"iovec=[{iov_base=%p, iov_len=%u}"
355
+		", {iov_base=%p, iov_len=%u}], offset=%" PRI__d64 "}, "
356 356
 	       "{data=%#" PRI__x64 ", preadv, reqprio=%hd, fildes=0, "
357
-	               "iovec=[{iov_base=%p, iov_len=%u}"
358
-	               ", {iov_base=%p, iov_len=%u}], offset=%" PRI__d64 "}"
357
+		"iovec=[{iov_base=%p, iov_len=%u}"
358
+		", {iov_base=%p, iov_len=%u}], offset=%" PRI__d64 "}"
359 359
 	       "]) = %s\n",
360 360
 	       *ctx, nr,
361 361
 	       cbv[0].aio_data, cbv[0].aio_reqprio,

+ 22
- 22
tests/btrfs.c View File

@@ -75,10 +75,10 @@ const char uuid_reference_string[] = "01234567-89ab-cdef-fedc-ba9876543210";
75 75
 struct btrfs_ioctl_quota_rescan_args {
76 76
 	uint64_t flags, progress, reserved[6];
77 77
 };
78
-# define BTRFS_IOC_QUOTA_RESCAN _IOW(BTRFS_IOCTL_MAGIC, 44, \
79
-					struct btrfs_ioctl_quota_rescan_args)
80
-# define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \
81
-					struct btrfs_ioctl_quota_rescan_args)
78
+# define BTRFS_IOC_QUOTA_RESCAN			\
79
+	_IOW(BTRFS_IOCTL_MAGIC, 44, struct btrfs_ioctl_quota_rescan_args)
80
+# define BTRFS_IOC_QUOTA_RESCAN_STATUS		\
81
+	_IOR(BTRFS_IOCTL_MAGIC, 45, struct btrfs_ioctl_quota_rescan_args)
82 82
 #endif
83 83
 
84 84
 #ifndef BTRFS_IOC_QUOTA_RESCAN_WAIT
@@ -86,30 +86,30 @@ struct btrfs_ioctl_quota_rescan_args {
86 86
 #endif
87 87
 
88 88
 #ifndef BTRFS_IOC_GET_FEATURES
89
-# define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
90
-                                   struct btrfs_ioctl_feature_flags)
91
-# define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \
92
-                                   struct btrfs_ioctl_feature_flags[2])
93
-# define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
94
-                                   struct btrfs_ioctl_feature_flags[3])
89
+# define BTRFS_IOC_GET_FEATURES			\
90
+	_IOR(BTRFS_IOCTL_MAGIC, 57, struct btrfs_ioctl_feature_flags)
91
+# define BTRFS_IOC_SET_FEATURES			\
92
+	_IOW(BTRFS_IOCTL_MAGIC, 57, struct btrfs_ioctl_feature_flags[2])
93
+# define BTRFS_IOC_GET_SUPPORTED_FEATURES	\
94
+	_IOR(BTRFS_IOCTL_MAGIC, 57, struct btrfs_ioctl_feature_flags[3])
95 95
 #endif
96 96
 
97 97
 #ifndef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS
98 98
 struct btrfs_ioctl_feature_flags {
99
-        uint64_t compat_flags;
100
-        uint64_t compat_ro_flags;
101
-        uint64_t incompat_flags;
99
+	uint64_t compat_flags;
100
+	uint64_t compat_ro_flags;
101
+	uint64_t incompat_flags;
102 102
 };
103 103
 #endif
104 104
 
105 105
 #ifndef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START
106 106
 struct btrfs_ioctl_defrag_range_args {
107
-        uint64_t start;
108
-        uint64_t len;
109
-        uint64_t flags;
110
-        uint32_t extent_thresh;
111
-        uint32_t compress_type;
112
-        uint32_t unused[4];
107
+	uint64_t start;
108
+	uint64_t len;
109
+	uint64_t flags;
110
+	uint32_t extent_thresh;
111
+	uint32_t compress_type;
112
+	uint32_t unused[4];
113 113
 };
114 114
 #endif
115 115
 
@@ -140,14 +140,14 @@ struct file_dedupe_range {
140 140
 #endif
141 141
 
142 142
 #ifndef BTRFS_IOC_TREE_SEARCH_V2
143
-# define BTRFS_IOC_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, \
144
-                                           struct btrfs_ioctl_search_args_v2)
143
+# define BTRFS_IOC_TREE_SEARCH_V2	\
144
+	_IOWR(BTRFS_IOCTL_MAGIC, 17, struct btrfs_ioctl_search_args_v2)
145 145
 struct btrfs_ioctl_search_args_v2 {
146 146
 	struct btrfs_ioctl_search_key key; /* in/out - search parameters */
147 147
 	uint64_t buf_size;		   /* in - size of buffer
148 148
 					    * out - on EOVERFLOW: needed size
149 149
 					    *       to store item */
150
-        uint64_t buf[0];		   /* out - found items */
150
+	uint64_t buf[0];		   /* out - found items */
151 151
 };
152 152
 #endif
153 153
 

+ 2
- 1
tests/errno2name.c View File

@@ -476,6 +476,7 @@ errno2name(void)
476 476
 #ifdef EXFULL
477 477
 	CASE(EXFULL);
478 478
 #endif
479
-	default: perror_msg_and_fail("unknown errno %d", errno);
479
+	default:
480
+		perror_msg_and_fail("unknown errno %d", errno);
480 481
 	}
481 482
 }

+ 2
- 2
tests/futex.c View File

@@ -254,7 +254,7 @@ main(int argc, char *argv[])
254 254
 	       zero_extend_signed_to_ull(tmout->tv_nsec), sprintrc(rc));
255 255
 
256 256
 	CHECK_FUTEX_ENOSYS(uaddr,
257
-		FUTEX_CLOCK_REALTIME | FUTEX_PRIVATE_FLAG | FUTEX_WAIT ,
257
+		FUTEX_CLOCK_REALTIME | FUTEX_PRIVATE_FLAG | FUTEX_WAIT,
258 258
 		VAL, tmout, uaddr2, 0, (rc == -1) && (errno == EAGAIN));
259 259
 	printf("futex(%p, FUTEX_WAIT_PRIVATE|FUTEX_CLOCK_REALTIME, %u"
260 260
 	       ", {tv_sec=%lld, tv_nsec=%llu}) = %s\n",
@@ -612,7 +612,7 @@ main(int argc, char *argv[])
612 612
 
613 613
 	CHECK_FUTEX_ENOSYS(uaddr + 1, FUTEX_PRIVATE_FLAG | FUTEX_UNLOCK_PI, VAL,
614 614
 		tmout, uaddr2 + 1, VAL3, (rc == -1) && (errno == EFAULT));
615
-	printf("futex(%p, FUTEX_UNLOCK_PI_PRIVATE) = %s\n", uaddr +1,
615
+	printf("futex(%p, FUTEX_UNLOCK_PI_PRIVATE) = %s\n", uaddr + 1,
616 616
 		sprintrc(rc));
617 617
 
618 618
 	CHECK_INVALID_CLOCKRT(FUTEX_UNLOCK_PI, 0);

+ 4
- 4
tests/getcpu.c View File

@@ -41,16 +41,16 @@ int
41 41
 main(void)
42 42
 {
43 43
 	unsigned *bogus_cpu =
44
-		(unsigned *) tail_alloc(sizeof(* bogus_cpu)) + 1;
44
+		(unsigned *) tail_alloc(sizeof(*bogus_cpu)) + 1;
45 45
 	unsigned *bogus_node =
46
-		(unsigned *) tail_alloc(sizeof(* bogus_node)) + 1;
46
+		(unsigned *) tail_alloc(sizeof(*bogus_node)) + 1;
47 47
 	unsigned *bogus_tcache =
48
-		(unsigned *) tail_alloc(sizeof(* bogus_tcache)) + 1;
48
+		(unsigned *) tail_alloc(sizeof(*bogus_tcache)) + 1;
49 49
 
50 50
 	long res;
51 51
 	TAIL_ALLOC_OBJECT_CONST_PTR(unsigned, cpu);
52 52
 	TAIL_ALLOC_OBJECT_CONST_PTR(unsigned, node);
53
-	long * tcache = tail_alloc(128);
53
+	long *tcache = tail_alloc(128);
54 54
 
55 55
 	res = syscall(__NR_getcpu, NULL, NULL, NULL);
56 56
 	printf("getcpu(NULL, NULL, NULL) = %s\n", sprintrc(res));

+ 1
- 1
tests/ioctl.c View File

@@ -54,7 +54,7 @@
54 54
  && defined EV_KEY
55 55
 
56 56
 int
57
-main(void )
57
+main(void)
58 58
 {
59 59
 	uint64_t data = 0;
60 60
 

+ 22
- 22
tests/ioctl_sg_io_v3.c View File

@@ -198,12 +198,12 @@ main(void)
198 198
 	       sg_io->iovec_count,
199 199
 	       sg_io->dxfer_len,
200 200
 	       sg_io->timeout,
201
-	       * (unsigned char *) (iov[0].iov_base + 0),
202
-	       * (unsigned char *) (iov[0].iov_base + 1),
201
+	       *(unsigned char *) (iov[0].iov_base + 0),
202
+	       *(unsigned char *) (iov[0].iov_base + 1),
203 203
 	       (unsigned int) iov[0].iov_len,
204
-	       * (unsigned char *) (iov[1].iov_base + 0),
205
-	       * (unsigned char *) (iov[1].iov_base + 1),
206
-	       * (unsigned char *) (iov[1].iov_base + 2),
204
+	       *(unsigned char *) (iov[1].iov_base + 0),
205
+	       *(unsigned char *) (iov[1].iov_base + 1),
206
+	       *(unsigned char *) (iov[1].iov_base + 2),
207 207
 	       (unsigned int) iov[1].iov_len,
208 208
 	       sg_io->status,
209 209
 	       sg_io->masked_status,
@@ -248,12 +248,12 @@ main(void)
248 248
 	       sg_io->iovec_count,
249 249
 	       sg_io->dxfer_len,
250 250
 	       sg_io->timeout,
251
-	       * (unsigned char *) (iov[0].iov_base + 0),
252
-	       * (unsigned char *) (iov[0].iov_base + 1),
251
+	       *(unsigned char *) (iov[0].iov_base + 0),
252
+	       *(unsigned char *) (iov[0].iov_base + 1),
253 253
 	       (unsigned int) iov[0].iov_len,
254
-	       * (unsigned char *) (iov[1].iov_base + 0),
255
-	       * (unsigned char *) (iov[1].iov_base + 1),
256
-	       * (unsigned char *) (iov[1].iov_base + 2),
254
+	       *(unsigned char *) (iov[1].iov_base + 0),
255
+	       *(unsigned char *) (iov[1].iov_base + 1),
256
+	       *(unsigned char *) (iov[1].iov_base + 2),
257 257
 	       (unsigned int) iov[1].iov_len,
258 258
 	       sg_io->status,
259 259
 	       sg_io->masked_status,
@@ -300,10 +300,10 @@ main(void)
300 300
 	       sg_io->iovec_count,
301 301
 	       sg_io->dxfer_len,
302 302
 	       sg_io->timeout,
303
-	       * (unsigned char *) (sg_io->dxferp + 0),
304
-	       * (unsigned char *) (sg_io->dxferp + 1),
305
-	       * (unsigned char *) (sg_io->dxferp + 2),
306
-	       * (unsigned char *) (sg_io->dxferp + 3),
303
+	       *(unsigned char *) (sg_io->dxferp + 0),
304
+	       *(unsigned char *) (sg_io->dxferp + 1),
305
+	       *(unsigned char *) (sg_io->dxferp + 2),
306
+	       *(unsigned char *) (sg_io->dxferp + 3),
307 307
 	       sg_io->status,
308 308
 	       sg_io->masked_status,
309 309
 	       sg_io->msg_status,
@@ -348,11 +348,11 @@ main(void)
348 348
 	       sg_io->iovec_count,
349 349
 	       sg_io->dxfer_len,
350 350
 	       sg_io->timeout,
351
-	       * (unsigned char *) (sg_io->dxferp + 0),
352
-	       * (unsigned char *) (sg_io->dxferp + 1),
353
-	       * (unsigned char *) (sg_io->dxferp + 2),
354
-	       * (unsigned char *) (sg_io->dxferp + 0),
355
-	       * (unsigned char *) (sg_io->dxferp + 1),
351
+	       *(unsigned char *) (sg_io->dxferp + 0),
352
+	       *(unsigned char *) (sg_io->dxferp + 1),
353
+	       *(unsigned char *) (sg_io->dxferp + 2),
354
+	       *(unsigned char *) (sg_io->dxferp + 0),
355
+	       *(unsigned char *) (sg_io->dxferp + 1),
356 356
 	       sg_io->status,
357 357
 	       sg_io->masked_status,
358 358
 	       sg_io->msg_status,
@@ -394,9 +394,9 @@ main(void)
394 394
 	       sg_io->iovec_count,
395 395
 	       sg_io->dxfer_len,
396 396
 	       sg_io->timeout,
397
-	       * (unsigned char *) (sg_io->dxferp + 0),
398
-	       * (unsigned char *) (sg_io->dxferp + 1),
399
-	       * (unsigned char *) (sg_io->dxferp + 2),
397
+	       *(unsigned char *) (sg_io->dxferp + 0),
398
+	       *(unsigned char *) (sg_io->dxferp + 1),
399
+	       *(unsigned char *) (sg_io->dxferp + 2),
400 400
 	       sg_io->status,
401 401
 	       sg_io->masked_status,
402 402
 	       sg_io->msg_status,

+ 14
- 14
tests/ioctl_sg_io_v4.c View File

@@ -189,9 +189,9 @@ main(void)
189 189
 	       ", dout_resid=%d"
190 190
 	       ", generated_tag=%#" PRI__x64 "}) = -1 EBADF (%m)\n",
191 191
 	       sg_io->request_len,
192
-	       * (unsigned char *) ((unsigned long) sg_io->request + 0),
193
-	       * (unsigned char *) ((unsigned long) sg_io->request + 1),
194
-	       * (unsigned char *) ((unsigned long) sg_io->request + 2),
192
+	       *(unsigned char *) ((unsigned long) sg_io->request + 0),
193
+	       *(unsigned char *) ((unsigned long) sg_io->request + 1),
194
+	       *(unsigned char *) ((unsigned long) sg_io->request + 2),
195 195
 	       sg_io->request_tag,
196 196
 	       sg_io->request_attr,
197 197
 	       sg_io->request_priority,
@@ -201,22 +201,22 @@ main(void)
201 201
 	       sg_io->dout_xfer_len,
202 202
 	       sg_io->din_iovec_count,
203 203
 	       sg_io->din_xfer_len,
204
-	       * (unsigned char *) (iov[0].iov_base + 0),
205
-	       * (unsigned char *) (iov[0].iov_base + 1),
204
+	       *(unsigned char *) (iov[0].iov_base + 0),
205
+	       *(unsigned char *) (iov[0].iov_base + 1),
206 206
 	       (unsigned int) iov[0].iov_len,
207
-	       * (unsigned char *) (iov[1].iov_base + 0),
208
-	       * (unsigned char *) (iov[1].iov_base + 1),
209
-	       * (unsigned char *) (iov[1].iov_base + 2),
207
+	       *(unsigned char *) (iov[1].iov_base + 0),
208
+	       *(unsigned char *) (iov[1].iov_base + 1),
209
+	       *(unsigned char *) (iov[1].iov_base + 2),
210 210
 	       (unsigned int) iov[1].iov_len,
211 211
 	       sg_io->timeout,
212 212
 	       sg_io->usr_ptr,
213 213
 	       sg_io->response_len,
214
-	       * (unsigned char *) ((unsigned long) sg_io->response + 0),
215
-	       * (unsigned char *) ((unsigned long) sg_io->response + 1),
216
-	       * (unsigned char *) ((unsigned long) sg_io->din_xferp + 0),
217
-	       * (unsigned char *) ((unsigned long) sg_io->din_xferp + 1),
218
-	       * (unsigned char *) ((unsigned long) sg_io->din_xferp + 2),
219
-	       * (unsigned char *) ((unsigned long) sg_io->din_xferp + 3),
214
+	       *(unsigned char *) ((unsigned long) sg_io->response + 0),
215
+	       *(unsigned char *) ((unsigned long) sg_io->response + 1),
216
+	       *(unsigned char *) ((unsigned long) sg_io->din_xferp + 0),
217
+	       *(unsigned char *) ((unsigned long) sg_io->din_xferp + 1),
218
+	       *(unsigned char *) ((unsigned long) sg_io->din_xferp + 2),
219
+	       *(unsigned char *) ((unsigned long) sg_io->din_xferp + 3),
220 220
 	       sg_io->driver_status,
221 221
 	       sg_io->transport_status,
222 222
 	       sg_io->device_status,

+ 1
- 1
tests/ioctl_sock_gifconf.c View File

@@ -105,7 +105,7 @@ print_ifconf(struct ifconf *ifc, int in_len, char *in_buf, long rc)
105 105
 static void
106 106
 gifconf_ioctl(int fd, struct ifconf *ifc, bool ifc_valid)
107 107
 {
108
-	const char * errstr;
108
+	const char *errstr;
109 109
 	int in_len;
110 110
 	char *in_buf;
111 111
 	long rc;

+ 1
- 1
tests/ioctl_uffdio.c View File

@@ -71,7 +71,7 @@ main(void)
71 71
 	api_struct->features = 0;
72 72
 	rc = ioctl(fd, UFFDIO_API, api_struct);
73 73
 	printf("ioctl(%d, UFFDIO_API, {api=0xaa, features=0, "
74
-	       "features.out=%#" PRIx64 ", " "ioctls=1<<_UFFDIO_REGISTER|"
74
+	       "features.out=%#" PRIx64 ", ioctls=1<<_UFFDIO_REGISTER|"
75 75
 	       "1<<_UFFDIO_UNREGISTER|1<<_UFFDIO_API",
76 76
 	       fd, (uint64_t)api_struct->features);
77 77
 	api_struct->ioctls &= ~(1ull<<_UFFDIO_REGISTER|

+ 6
- 6
tests/ioctl_v4l2.c View File

@@ -85,7 +85,7 @@ init_v4l2_format(struct v4l2_format *const f,
85 85
 		f->fmt.pix_mp.pixelformat = magic;
86 86
 		f->fmt.pix_mp.field = V4L2_FIELD_NONE;
87 87
 		f->fmt.pix_mp.colorspace = V4L2_COLORSPACE_JPEG;
88
-		struct v4l2_plane_pix_format* cur_pix =
88
+		struct v4l2_plane_pix_format *cur_pix =
89 89
 		       f->fmt.pix_mp.plane_fmt;
90 90
 		for (i = 0;
91 91
 		     i < ARRAY_SIZE(f->fmt.pix_mp.plane_fmt);
@@ -119,7 +119,7 @@ init_v4l2_format(struct v4l2_format *const f,
119 119
 		f->fmt.win.clips[1].c.width = 0x9e3a6fb3;
120 120
 		f->fmt.win.clips[1].c.height = 0x05617b76;
121 121
 
122
-		f->fmt.win.bitmap = (void*) -2UL;
122
+		f->fmt.win.bitmap = (void *) -2UL;
123 123
 #ifdef HAVE_STRUCT_V4L2_WINDOW_GLOBAL_ALPHA
124 124
 		f->fmt.win.global_alpha = 0xce;
125 125
 #endif
@@ -168,8 +168,8 @@ init_v4l2_format(struct v4l2_format *const f,
168 168
 
169 169
 static void
170 170
 dprint_ioctl_v4l2(struct v4l2_format *const f,
171
-		  const char* request, const unsigned int buf_type,
172
-		  const char* buf_type_string)
171
+		  const char *request, const unsigned int buf_type,
172
+		  const char *buf_type_string)
173 173
 {
174 174
 	switch (buf_type) {
175 175
 	case V4L2_BUF_TYPE_VIDEO_CAPTURE:
@@ -323,7 +323,7 @@ dprint_ioctl_v4l2(struct v4l2_format *const f,
323 323
 	dprint_ioctl_v4l2((v4l2_format), (request), (buf_type), #buf_type)
324 324
 
325 325
 int
326
-main(void )
326
+main(void)
327 327
 {
328 328
 	const unsigned int size = get_page_size();
329 329
 	void *const page = tail_alloc(size);
@@ -688,7 +688,7 @@ main(void )
688 688
 
689 689
 	TAIL_ALLOC_OBJECT_CONST_PTR(struct v4l2_tuner, p_tuner);
690 690
 	p_tuner->index = 0x4fb6df39;
691
-	strcpy((char*)p_tuner->name, "cum tacent clamant");
691
+	strcpy((char *) p_tuner->name, "cum tacent clamant");
692 692
 	p_tuner->type = V4L2_TUNER_RADIO;
693 693
 	p_tuner->capability = V4L2_TUNER_CAP_LOW;
694 694
 	p_tuner->rangelow = 0xa673bc29;

+ 1
- 1
tests/ip_mreq.c View File

@@ -101,7 +101,7 @@ main(void)
101 101
 				short_any[i].optval, 1);
102 102
 		printf("setsockopt(0, %s, %s, \"\\%hho\", 1) = %s\n",
103 103
 		       short_any[i].str_level, short_any[i].str_optname,
104
-		       * (unsigned char *) short_any[i].optval,
104
+		       *(unsigned char *) short_any[i].optval,
105 105
 		       sprintrc(rc));
106 106
 
107 107
 		rc = setsockopt(0, short_any[i].level, short_any[i].optname,

+ 1
- 1
tests/ipc_msgbuf.c View File

@@ -45,7 +45,7 @@ cleanup(void)
45 45
 }
46 46
 
47 47
 int
48
-main (void)
48
+main(void)
49 49
 {
50 50
 	const long mtype = 0xdefaced;
51 51
 	struct {

+ 4
- 4
tests/ipc_sem.c View File

@@ -37,10 +37,10 @@
37 37
 #include "xlat/resource_flags.h"
38 38
 
39 39
 union semun {
40
-	int              val;    /* Value for SETVAL */
41
-	struct semid_ds *buf;    /* Buffer for IPC_STAT, IPC_SET */
42
-	unsigned short  *array;  /* Array for GETALL, SETALL */
43
-	struct seminfo  *__buf;  /* Buffer for IPC_INFO
40
+	int		 val;    /* Value for SETVAL */
41
+	struct semid_ds	*buf;    /* Buffer for IPC_STAT, IPC_SET */
42
+	unsigned short	*array;  /* Array for GETALL, SETALL */
43
+	struct seminfo	*__buf;  /* Buffer for IPC_INFO
44 44
 				    (Linux-specific) */
45 45
 };
46 46
 

+ 1
- 1
tests/ksysent.c View File

@@ -53,7 +53,7 @@
53 53
 #define SI 0
54 54
 #define SE 0
55 55
 #define CST 0
56
-#define SEN(arg) 0,0
56
+#define SEN(arg) 0, 0
57 57
 
58 58
 static const struct_sysent syscallent[] = {
59 59
 #include "syscallent.h"

+ 1
- 1
tests/mmsg_name.c View File

@@ -77,7 +77,7 @@ print_msghdr(const struct msghdr *const msg, const int user_msg_namelen)
77 77
 	}
78 78
 	printf("%d, msg_iov=[{iov_base=\"%c\", iov_len=1}]"
79 79
 	       ", msg_iovlen=1, msg_controllen=0, msg_flags=0}",
80
-	       (int) msg->msg_namelen, * (char *) msg->msg_iov[0].iov_base);
80
+	       (int) msg->msg_namelen, *(char *) msg->msg_iov[0].iov_base);
81 81
 }
82 82
 
83 83
 static void

+ 1
- 1
tests/mq.c View File

@@ -39,7 +39,7 @@
39 39
 # include <sys/stat.h>
40 40
 
41 41
 int
42
-main (void)
42
+main(void)
43 43
 {
44 44
 	struct mq_attr attr;
45 45
 	(void) close(0);

+ 1
- 1
tests/mq_sendrecv.c View File

@@ -437,7 +437,7 @@ main(void)
437 437
 	bogus_attrs[1] = 2;
438 438
 	bogus_attrs[2] = MSG_SIZE;
439 439
 	fd = rc = syscall(__NR_mq_open, mq_name,
440
-		          O_CREAT|O_RDWR|O_NONBLOCK, S_IRWXU, bogus_attrs);
440
+			  O_CREAT|O_RDWR|O_NONBLOCK, S_IRWXU, bogus_attrs);
441 441
 	errstr = sprintrc(rc);
442 442
 	if (rc < 0)
443 443
 		perror_msg_and_skip("mq_open");

+ 3
- 3
tests/msg_control.c View File

@@ -536,7 +536,7 @@ test_sol_socket(struct msghdr *const mh, void *const page)
536 536
 
537 537
 static void
538 538
 test_ip_pktinfo(struct msghdr *const mh, void *const page,
539
-	        const int cmsg_type, const char *const cmsg_type_str)
539
+		const int cmsg_type, const char *const cmsg_type_str)
540 540
 {
541 541
 	const unsigned int len = CMSG_SPACE(sizeof(struct in_pktinfo));
542 542
 	struct cmsghdr *const cmsg = get_cmsghdr(page, len);
@@ -601,7 +601,7 @@ test_ip_uint(struct msghdr *const mh, void *const page,
601 601
 
602 602
 static void
603 603
 test_ip_uint8_t(struct msghdr *const mh, void *const page,
604
-	        const int cmsg_type, const char *const cmsg_type_str)
604
+		const int cmsg_type, const char *const cmsg_type_str)
605 605
 {
606 606
 	const unsigned int len = CMSG_SPACE(1);
607 607
 	struct cmsghdr *const cmsg = get_cmsghdr(page, len);
@@ -683,7 +683,7 @@ struct sock_ee {
683 683
 
684 684
 static void
685 685
 test_ip_recverr(struct msghdr *const mh, void *const page,
686
-	        const int cmsg_type, const char *const cmsg_type_str)
686
+		const int cmsg_type, const char *const cmsg_type_str)
687 687
 {
688 688
 	const unsigned int len = CMSG_SPACE(sizeof(struct sock_ee));
689 689
 	struct cmsghdr *const cmsg = get_cmsghdr(page, len);

+ 1
- 1
tests/net-y-unix.c View File

@@ -182,7 +182,7 @@ main(void)
182 182
 		perror_msg_and_fail("accept");
183 183
 	accept_inode = inode_of_sockfd(accept_fd);
184 184
 	const char * const sun_path1 =
185
-		((struct sockaddr_un *) accept_sa) -> sun_path + 1;
185
+		((struct sockaddr_un *) accept_sa)->sun_path + 1;
186 186
 	printf("accept(%d<socket:[%lu]>, {sa_family=AF_UNIX"
187 187
 	       ", sun_path=@\"%s\"}, [%d->%d]) = %d<socket:[%lu]>\n",
188 188
 	       listen_fd, listen_inode, sun_path1,

+ 2
- 2
tests/net-yy-inet.c View File

@@ -74,7 +74,7 @@ main(void)
74 74
 	if (getsockname(listen_fd, listen_sa, len))
75 75
 		perror_msg_and_fail("getsockname");
76 76
 	const unsigned int listen_port =
77
-		ntohs(((struct sockaddr_in *) listen_sa) -> sin_port);
77
+		ntohs(((struct sockaddr_in *) listen_sa)->sin_port);
78 78
 	printf("getsockname(%d<TCP:[127.0.0.1:%u]>, {sa_family=AF_INET"
79 79
 	       ", sin_port=htons(%u), sin_addr=inet_addr(\"127.0.0.1\")}"
80 80
 	       ", [%u]) = 0\n",
@@ -109,7 +109,7 @@ main(void)
109 109
 	if (accept_fd < 0)
110 110
 		perror_msg_and_fail("accept");
111 111
 	const unsigned int connect_port =
112
-		ntohs(((struct sockaddr_in *) accept_sa) -> sin_port);
112
+		ntohs(((struct sockaddr_in *) accept_sa)->sin_port);
113 113
 	printf("accept(%d<TCP:[127.0.0.1:%u]>, {sa_family=AF_INET"
114 114
 	       ", sin_port=htons(%u), sin_addr=inet_addr(\"127.0.0.1\")}"
115 115
 	       ", [%u]) = %d<TCP:[127.0.0.1:%u->127.0.0.1:%u]>\n",

+ 1
- 1
tests/net-yy-unix.c View File

@@ -185,7 +185,7 @@ main(void)
185 185
 		perror_msg_and_fail("accept");
186 186
 	accept_inode = inode_of_sockfd(accept_fd);
187 187
 	const char * const sun_path1 =
188
-		((struct sockaddr_un *) accept_sa) -> sun_path + 1;
188
+		((struct sockaddr_un *) accept_sa)->sun_path + 1;
189 189
 	printf("accept(%d<UNIX:[%lu,\"%s\"]>, {sa_family=AF_UNIX"
190 190
 	       ", sun_path=@\"%s\"}, [%d->%d]) = %d<UNIX:[%lu->%lu,\"%s\"]>\n",
191 191
 	       listen_fd, listen_inode, TEST_SOCKET, sun_path1,

+ 1
- 1
tests/nsyscalls.c View File

@@ -54,7 +54,7 @@
54 54
 #define SI 0
55 55
 #define SE 0
56 56
 #define CST 0
57
-#define SEN(arg) 0,0
57
+#define SEN(arg) 0, 0
58 58
 
59 59
 static const struct_sysent syscallent[] = {
60 60
 #include "syscallent.h"

+ 42
- 42
tests/perf_event_open.c View File

@@ -75,34 +75,34 @@ struct u64_val_str {
75 75
 
76 76
 /* In order to avoid endianness-specific hackery. */
77 77
 struct pea_flags {
78
-	uint64_t disabled                 :1,
79
-	         inherit                  :1,
80
-	         pinned                   :1,
81
-	         exclusive                :1,
82
-	         exclude_user             :1,
83
-	         exclude_kernel           :1,
84
-	         exclude_hv               :1,
85
-	         exclude_idle             :1,
86
-	         mmap                     :1,
87
-	         comm                     :1,
88
-	         freq                     :1,
89
-	         inherit_stat             :1,
90
-	         enable_on_exec           :1,
91
-	         task                     :1,
92
-	         watermark                :1,
93
-	         precise_ip               :2,
94
-	         mmap_data                :1,
95
-	         sample_id_all            :1,
96
-	         exclude_host             :1,
97
-	         exclude_guest            :1,
98
-	         exclude_callchain_kernel :1,
99
-	         exclude_callchain_user   :1,
100
-	         mmap2                    :1,
101
-	         comm_exec                :1,
102
-	         use_clockid              :1,
103
-	         context_switch           :1,
104
-	         write_backward           :1,
105
-	         __reserved_1             :36;
78
+	uint64_t disabled			:1,
79
+		 inherit			:1,
80
+		 pinned				:1,
81
+		 exclusive			:1,
82
+		 exclude_user			:1,
83
+		 exclude_kernel			:1,
84
+		 exclude_hv			:1,
85
+		 exclude_idle			:1,
86
+		 mmap				:1,
87
+		 comm				:1,
88
+		 freq				:1,
89
+		 inherit_stat			:1,
90
+		 enable_on_exec			:1,
91
+		 task				:1,
92
+		 watermark			:1,
93
+		 precise_ip			:2,
94
+		 mmap_data			:1,
95
+		 sample_id_all			:1,
96
+		 exclude_host			:1,
97
+		 exclude_guest			:1,
98
+		 exclude_callchain_kernel	:1,
99
+		 exclude_callchain_user		:1,
100
+		 mmap2				:1,
101
+		 comm_exec			:1,
102
+		 use_clockid			:1,
103
+		 context_switch			:1,
104
+		 write_backward			:1,
105
+		 __reserved_1			:36;
106 106
 };
107 107
 
108 108
 static const char *
@@ -458,7 +458,7 @@ print_event_attr(struct perf_event_attr *attr_ptr, size_t size,
458 458
 
459 459
 	/* End of version 4 of the structure */
460 460
 	if (size <= 104) {
461
-		cutoff =104;
461
+		cutoff = 104;
462 462
 		goto end;
463 463
 	}
464 464
 
@@ -471,7 +471,7 @@ print_event_attr(struct perf_event_attr *attr_ptr, size_t size,
471 471
 	printf(", aux_watermark=%" PRIu32, (uint32_t) val);
472 472
 
473 473
 	if (size <= 108) {
474
-		cutoff =108;
474
+		cutoff = 108;
475 475
 		goto end;
476 476
 	}
477 477
 
@@ -484,7 +484,7 @@ print_event_attr(struct perf_event_attr *attr_ptr, size_t size,
484 484
 	printf(", sample_max_stack=%" PRIu16, (uint16_t) val);
485 485
 
486 486
 	if (size <= 110) {
487
-		cutoff =110;
487
+		cutoff = 110;
488 488
 		goto end;
489 489
 	}
490 490
 
@@ -718,7 +718,7 @@ main(void)
718 718
 
719 719
 	for (i = 0; i < ARRAY_SIZE(args); i++) {
720 720
 		rc = syscall(__NR_perf_event_open, args[i].attr, args[i].pid,
721
-		             args[i].cpu, args[i].group_fd, args[i].flags);
721
+			     args[i].cpu, args[i].group_fd, args[i].flags);
722 722
 		printf("perf_event_open(%s, %d, %d, %d, %s) = %s\n",
723 723
 		       printaddr(args[i].attr), args[i].pid, args[i].cpu,
724 724
 		       args[i].group_fd, args[i].flags_str, sprintrc(rc));
@@ -793,19 +793,19 @@ main(void)
793 793
 			attr->size = 0;
794 794
 
795 795
 		rc = syscall(__NR_perf_event_open, attr, args[args_idx].pid,
796
-		             args[args_idx].cpu, args[args_idx].group_fd,
797
-		             args[args_idx].flags);
796
+			     args[args_idx].cpu, args[args_idx].group_fd,
797
+			     args[args_idx].flags);
798 798
 
799 799
 		printf("perf_event_open(");
800 800
 		print_event_attr(attr, i ? ((i == 1) ? 0 : size) : size + 8,
801
-		                 attr_types[type_idx].str,
802
-		                 attr_configs[type_idx][config_idx].str,
803
-		                 sample_types[sample_type_idx].str,
804
-		                 read_formats[read_format_idx].str,
805
-		                 ip_desc_str,
806
-		                 bp_types[bp_type_idx].str,
807
-		                 branch_sample_types[branch_sample_type_idx].str,
808
-		                 clockids[clockid_idx].str, size);
801
+				 attr_types[type_idx].str,
802
+				 attr_configs[type_idx][config_idx].str,
803
+				 sample_types[sample_type_idx].str,
804
+				 read_formats[read_format_idx].str,
805
+				 ip_desc_str,
806
+				 bp_types[bp_type_idx].str,
807
+				 branch_sample_types[branch_sample_type_idx].str,
808
+				 clockids[clockid_idx].str, size);
809 809
 		printf(", %d, %d, %d, %s) = %s\n", args[args_idx].pid,
810 810
 		       args[args_idx].cpu, args[args_idx].group_fd,
811 811
 		       args[args_idx].flags_str, sprintrc(rc));

+ 4
- 3
tests/ppoll.c View File

@@ -138,9 +138,10 @@ main(void)
138 138
 #if VERBOSE
139 139
 	       pipe_fd[2], pipe_fd[3],
140 140
 #endif
141
-	       (unsigned) ARRAY_SIZE(fds1), USR2_CHLD_str,
142
-	       (unsigned) sigset_size, rc, pipe_fd[1], POLLWRNORM_str,
143
-	       pipe_fd[3], (unsigned ) ts->tv_sec, (unsigned) ts->tv_nsec);
141
+	       (unsigned int) ARRAY_SIZE(fds1), USR2_CHLD_str,
142
+	       (unsigned int) sigset_size, rc, pipe_fd[1], POLLWRNORM_str,
143
+	       pipe_fd[3], (unsigned int) ts->tv_sec,
144
+	       (unsigned int) ts->tv_nsec);
144 145
 
145 146
 	ts->tv_sec = 0;
146 147
 	ts->tv_nsec = 999;

+ 1
- 1
tests/print_quoted_string.c View File

@@ -18,7 +18,7 @@ print_quoted_string(const char *instr)
18 18
 void
19 19
 print_quoted_memory(const char *instr, const size_t len)
20 20
 {
21
-	const unsigned char *str = (const unsigned char*) instr;
21
+	const unsigned char *str = (const unsigned char *) instr;
22 22
 	size_t i;
23 23
 
24 24
 	for (i = 0; i < len; ++i) {

+ 0
- 2
tests/print_time.c View File

@@ -58,8 +58,6 @@ print_time_t_ex(const time_t t, const unsigned long long part_sec,
58 58
 
59 59
 	if (comment)
60 60
 		fputs(" */", stdout);
61
-
62
-	return;
63 61
 }
64 62
 
65 63
 void

+ 10
- 9
tests/process_vm_readv_writev.c View File

@@ -51,7 +51,7 @@ enum { MAX_SEGM_COUNT = 2, MAX_STR_LEN = 5 };
51 51
 struct print_iov_arg {
52 52
 	uint32_t count;
53 53
 	uint32_t valid    :1,
54
-	         string   :1,
54
+		 string   :1,