diff mbox series

Add more spaces before '('

Message ID alpine.DEB.2.21.1902280015590.13118@digraph.polyomino.org.uk
State New
Headers show
Series Add more spaces before '(' | expand

Commit Message

Joseph Myers Feb. 28, 2019, 12:16 a.m. UTC
This patch fixes more places where a space should have been present
before '(' in accordance with the GNU Coding Standards (as with the
previous patch, mainly for calls to sizeof).

Tested with build-many-glibcs.py.

2019-02-28  Joseph Myers  <joseph@codesourcery.com>

	* sysdeps/powerpc/powerpc32/dl-machine.c
	(__elf_machine_fixup_plt): Use space before '('.
	(__process_machine_rela): Likewise.
	* sysdeps/powerpc/powerpc32/register-dump.h (register_dump):
	Likewise.
	* sysdeps/powerpc/powerpc64/le/fpu/sfp-machine.h (TI_BITS):
	Likewise.
	* sysdeps/powerpc/powerpc64/register-dump.h (register_dump):
	Likewise.
	* sysdeps/powerpc/test-arith.c (union_t): Likewise.
	(pattern): Likewise.
	(delta): Likewise.
	(check_result): Likewise.
	(check_excepts): Likewise.
	(check_op): Likewise.
	(fail_xr): Likewise.
	* sysdeps/unix/alpha/sysdep.h (syscall_promote): Likewise.
	* sysdeps/unix/sysv/linux/alpha/a.out.h (AOUTHSZ): Likewise.
	(SCNHSZ): Likewise.
	* sysdeps/unix/sysv/linux/hppa/makecontext.c (FRAME_SIZE_BYTES):
	Likewise.
	(ARGS): Likewise.
	(__makecontext): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h (ucontext_t):
	Likewise.

Comments

Gabriel F. T. Gomes Feb. 28, 2019, 2:28 a.m. UTC | #1
On Thu, Feb 28 2019, Joseph Myers wrote:
> This patch fixes more places where a space should have been present
> before '(' in accordance with the GNU Coding Standards (as with the
> previous patch, mainly for calls to sizeof).
> 
> Tested with build-many-glibcs.py.
> 
> 2019-02-28  Joseph Myers  <joseph@codesourcery.com>
> 
> 	* sysdeps/powerpc/powerpc32/dl-machine.c
> 	(__elf_machine_fixup_plt): Use space before '('.
> 	(__process_machine_rela): Likewise.
> 	* sysdeps/powerpc/powerpc32/register-dump.h (register_dump):
> 	Likewise.
> 	* sysdeps/powerpc/powerpc64/le/fpu/sfp-machine.h (TI_BITS):
> 	Likewise.
> 	* sysdeps/powerpc/powerpc64/register-dump.h (register_dump):
> 	Likewise.
> 	* sysdeps/powerpc/test-arith.c (union_t): Likewise.
> 	(pattern): Likewise.
> 	(delta): Likewise.
> 	(check_result): Likewise.
> 	(check_excepts): Likewise.
> 	(check_op): Likewise.
> 	(fail_xr): Likewise.
> 	* sysdeps/unix/alpha/sysdep.h (syscall_promote): Likewise.
> 	* sysdeps/unix/sysv/linux/alpha/a.out.h (AOUTHSZ): Likewise.
> 	(SCNHSZ): Likewise.
> 	* sysdeps/unix/sysv/linux/hppa/makecontext.c (FRAME_SIZE_BYTES):
> 	Likewise.
> 	(ARGS): Likewise.
> 	(__makecontext): Likewise.
> 	* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h (ucontext_t):
> 	Likewise.

Looks good to me.
diff mbox series

Patch

diff --git a/sysdeps/powerpc/powerpc32/dl-machine.c b/sysdeps/powerpc/powerpc32/dl-machine.c
index 79ac6f427b..0651d5cf05 100644
--- a/sysdeps/powerpc/powerpc32/dl-machine.c
+++ b/sysdeps/powerpc/powerpc32/dl-machine.c
@@ -348,7 +348,7 @@  __elf_machine_fixup_plt (struct link_map *map,
       Elf32_Word index, offset, num_plt_entries;
 
       num_plt_entries = (map->l_info[DT_PLTRELSZ]->d_un.d_val
-			 / sizeof(Elf32_Rela));
+			 / sizeof (Elf32_Rela));
       plt = (Elf32_Word *) D_PTR (map, l_info[DT_PLTGOT]);
       offset = reloc_addr - plt;
       index = (offset - PLT_INITIAL_ENTRY_WORDS)/2;
@@ -538,7 +538,7 @@  __process_machine_rela (struct link_map *map,
 	      {
 		index = (offset - PLT_INITIAL_ENTRY_WORDS)/2;
 		num_plt_entries = (map->l_info[DT_PLTRELSZ]->d_un.d_val
-				   / sizeof(Elf32_Rela));
+				   / sizeof (Elf32_Rela));
 		data_words = plt + PLT_DATA_START_WORDS (num_plt_entries);
 		data_words[index] = finaladdr;
 		reloc_addr[0] = OPCODE_LI (11, index * 4);
diff --git a/sysdeps/powerpc/powerpc32/register-dump.h b/sysdeps/powerpc/powerpc32/register-dump.h
index 2c3ba1d2eb..85a3c70b9c 100644
--- a/sysdeps/powerpc/powerpc32/register-dump.h
+++ b/sysdeps/powerpc/powerpc32/register-dump.h
@@ -96,15 +96,15 @@  r28=000001c% r29=000001d% r30=000001e% r31=000001f%  fscr=0000071% ccr=0000026%\
 static void
 register_dump (int fd, struct sigcontext *ctx)
 {
-  char buffer[sizeof(dumpform)];
+  char buffer[sizeof (dumpform)];
   char *bufferpos;
   unsigned regno;
   unsigned *regs = (unsigned *)(ctx->regs);
 
-  memcpy(buffer, dumpform, sizeof(dumpform));
+  memcpy(buffer, dumpform, sizeof (dumpform));
 
   /* Generate the output.  */
-  while ((bufferpos = memchr (buffer, '%', sizeof(dumpform))))
+  while ((bufferpos = memchr (buffer, '%', sizeof (dumpform))))
     {
       regno = xtoi (bufferpos[-1]) | xtoi (bufferpos[-2]) << 4;
       memset (bufferpos-2, '0', 3);
@@ -112,7 +112,7 @@  register_dump (int fd, struct sigcontext *ctx)
     }
 
   /* Write the output.  */
-  write (fd, buffer, sizeof(buffer) - 1);
+  write (fd, buffer, sizeof (buffer) - 1);
 }
 
 
diff --git a/sysdeps/powerpc/powerpc64/le/fpu/sfp-machine.h b/sysdeps/powerpc/powerpc64/le/fpu/sfp-machine.h
index fac5dd0347..ac74097d44 100644
--- a/sysdeps/powerpc/powerpc64/le/fpu/sfp-machine.h
+++ b/sysdeps/powerpc/powerpc64/le/fpu/sfp-machine.h
@@ -6,7 +6,7 @@ 
 typedef int TItype __attribute__ ((mode (TI)));
 typedef unsigned int UTItype __attribute__ ((mode (TI)));
 
-#define TI_BITS (__CHAR_BIT__ * (int)sizeof(TItype))
+#define TI_BITS (__CHAR_BIT__ * (int) sizeof (TItype))
 
 /* The type of the result of a floating point comparison.  This must
    match `__libgcc_cmp_return__' in GCC for the target.  */
diff --git a/sysdeps/powerpc/powerpc64/register-dump.h b/sysdeps/powerpc/powerpc64/register-dump.h
index 1454dc61d0..602e80ceae 100644
--- a/sysdeps/powerpc/powerpc64/register-dump.h
+++ b/sysdeps/powerpc/powerpc64/register-dump.h
@@ -100,15 +100,15 @@  fp28-31: 00000000000004c% 00000000000004d% 00000000000004e% 00000000000004f%\n\
 static void
 register_dump (int fd, struct sigcontext *ctx)
 {
-  char buffer[sizeof(dumpform)];
+  char buffer[sizeof (dumpform)];
   char *bufferpos;
   unsigned regno;
   unsigned long *regs = (unsigned long *)(ctx->regs);
 
-  memcpy(buffer, dumpform, sizeof(dumpform));
+  memcpy(buffer, dumpform, sizeof (dumpform));
 
   /* Generate the output.  */
-  while ((bufferpos = memchr (buffer, '%', sizeof(dumpform))))
+  while ((bufferpos = memchr (buffer, '%', sizeof (dumpform))))
     {
       regno = xtoi (bufferpos[-1]) | xtoi (bufferpos[-2]) << 4;
       memset (bufferpos-2, '0', 3);
@@ -116,7 +116,7 @@  register_dump (int fd, struct sigcontext *ctx)
     }
 
   /* Write the output.  */
-  write (fd, buffer, sizeof(buffer) - 1);
+  write (fd, buffer, sizeof (buffer) - 1);
 }
 
 
diff --git a/sysdeps/powerpc/test-arith.c b/sysdeps/powerpc/test-arith.c
index a13f33fc31..9cc95c412c 100644
--- a/sysdeps/powerpc/test-arith.c
+++ b/sysdeps/powerpc/test-arith.c
@@ -43,7 +43,7 @@  static const char * const rmnames[4] =
 
 typedef union {
   tocheck_t tc;
-  unsigned char c[sizeof(tocheck_t)];
+  unsigned char c[sizeof (tocheck_t)];
 } union_t;
 
 /* Don't try reading these in a font that doesn't distinguish
@@ -170,7 +170,7 @@  pattern(int negative, pattern_t exp, pattern_t mant)
   pattern_fill(mant, result.c, ESIZE+1, MSIZE);
 #if 0
   printf("neg=%d exp=%02x mant=%02x: ", negative, exp, mant);
-  for (i = 0; i < sizeof(tocheck_t); i++)
+  for (i = 0; i < sizeof (tocheck_t); i++)
     printf("%02x", result.c[i]);
   printf("\n");
 #endif
@@ -193,10 +193,10 @@  delta(tocheck_t x, int direction)
     {
       union_t tx;
       tx.tc = pattern(xx.c[0] >> 7, P_O, P_Z);
-      if (memcmp(tx.c, xx.c, sizeof(tocheck_t)) == 0)
+      if (memcmp (tx.c, xx.c, sizeof (tocheck_t)) == 0)
 	return x;
     }
-  for (i = sizeof(tocheck_t)-1; i > 0; i--)
+  for (i = sizeof (tocheck_t)-1; i > 0; i--)
     {
       xx.c[i] += direction;
       if (xx.c[i] != (direction > 0 ? 0 : 0xff))
@@ -222,7 +222,7 @@  static const int all_exceptions = FE_ALL_EXCEPT;
 static void
 check_result(int line, const char *rm, tocheck_t expected, tocheck_t actual)
 {
-  if (memcmp(&expected, &actual, sizeof(tocheck_t)) != 0)
+  if (memcmp (&expected, &actual, sizeof (tocheck_t)) != 0)
     {
       unsigned char *ex, *ac;
       size_t i;
@@ -231,10 +231,10 @@  check_result(int line, const char *rm, tocheck_t expected, tocheck_t actual)
 	     " expected result 0x", __FILE__, line, rm);
       ex = (unsigned char *)&expected;
       ac = (unsigned char *)&actual;
-      for (i = 0; i < sizeof(tocheck_t); i++)
+      for (i = 0; i < sizeof (tocheck_t); i++)
 	printf("%02x", ex[i]);
       printf(" got 0x");
-      for (i = 0; i < sizeof(tocheck_t); i++)
+      for (i = 0; i < sizeof (tocheck_t); i++)
 	printf("%02x", ac[i]);
       printf("\n");
       nerrors++;
@@ -325,13 +325,13 @@  check_excepts(int line, const char *rm, int expected, int actual)
       size_t i;
       printf("%s:%d:round %s:exceptions failed\n"
 	     " expected exceptions ", __FILE__, line,rm);
-      for (i = 0; i < sizeof(excepts)/sizeof(excepts[0]); i++)
+      for (i = 0; i < sizeof (excepts) / sizeof (excepts[0]); i++)
 	if (expected & excepts[i].except)
 	  printf("%s ",excepts[i].name);
       if ((expected & all_exceptions) == 0)
 	printf("- ");
       printf("got");
-      for (i = 0; i < sizeof(excepts)/sizeof(excepts[0]); i++)
+      for (i = 0; i < sizeof (excepts) / sizeof (excepts[0]); i++)
 	if (actual & excepts[i].except)
 	  printf(" %s",excepts[i].name);
       if ((actual & all_exceptions) == 0)
@@ -463,7 +463,7 @@  check_op(void)
   tocheck_t r, a, b, x;
   int raised;
 
-  for (i = 0; i < sizeof(optests)/sizeof(optests[0]); i++)
+  for (i = 0; i < sizeof (optests) / sizeof (optests[0]); i++)
     {
       a = pattern(optests[i].a_sgn, optests[i].a_exp,
 		  optests[i].a_mant);
@@ -504,13 +504,13 @@  fail_xr(int line, const char *rm, tocheck_t x, tocheck_t r, tocheck_t xx,
   cx = (unsigned char *)&x;
   cr = (unsigned char *)&r;
   cxx = (unsigned char *)&xx;
-  for (i = 0; i < sizeof(tocheck_t); i++)
+  for (i = 0; i < sizeof (tocheck_t); i++)
     printf("%02x", cx[i]);
   printf(" r=0x");
-  for (i = 0; i < sizeof(tocheck_t); i++)
+  for (i = 0; i < sizeof (tocheck_t); i++)
     printf("%02x", cr[i]);
   printf(" xx=0x");
-  for (i = 0; i < sizeof(tocheck_t); i++)
+  for (i = 0; i < sizeof (tocheck_t); i++)
     printf("%02x", cxx[i]);
   printf(" inexact=%d\n", xflag != 0);
   nerrors++;
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 05f8cde80b..dcd4c79be5 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -200,7 +200,7 @@  __LABEL(name)						\
    no matter what the "real" sign of the 32-bit type.  We want to
    preserve that when filling in values for the kernel.  */
 #define syscall_promote(arg) \
-  (sizeof(arg) == 4 ? (long)(int)(long)(arg) : (long)(arg))
+  (sizeof (arg) == 4 ? (long)(int)(long)(arg) : (long)(arg))
 
 /* Make sure and "use" the variable that we're not returning,
    in order to suppress unused variable warnings.  */
diff --git a/sysdeps/unix/sysv/linux/alpha/a.out.h b/sysdeps/unix/sysv/linux/alpha/a.out.h
index a7699f0fe0..44e19bd8fd 100644
--- a/sysdeps/unix/sysv/linux/alpha/a.out.h
+++ b/sysdeps/unix/sysv/linux/alpha/a.out.h
@@ -72,8 +72,8 @@  struct exec
 #define a_gpvalue	ah.gpvalue
 
 
-#define AOUTHSZ		sizeof(struct aouthdr)
-#define SCNHSZ		sizeof(struct scnhdr)
+#define AOUTHSZ		sizeof (struct aouthdr)
+#define SCNHSZ		sizeof (struct scnhdr)
 #define SCNROUND	16
 
 enum machine_type
diff --git a/sysdeps/unix/sysv/linux/hppa/makecontext.c b/sysdeps/unix/sysv/linux/hppa/makecontext.c
index baa6bb2cee..217fa2b5cc 100644
--- a/sysdeps/unix/sysv/linux/hppa/makecontext.c
+++ b/sysdeps/unix/sysv/linux/hppa/makecontext.c
@@ -31,9 +31,9 @@ 
 /* Size of frame marker in unsigned long words.  */
 #define FRAME_SIZE_UL 8
 /* Size of frame marker in bytes.  */
-#define FRAME_SIZE_BYTES (8 * sizeof(unsigned long))
+#define FRAME_SIZE_BYTES (8 * sizeof (unsigned long))
 /* Size of X arguments in bytes.  */
-#define ARGS(x) (x * sizeof(unsigned long))
+#define ARGS(x) (x * sizeof (unsigned long))
 
 void
 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
@@ -61,14 +61,14 @@  __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
   if (ucp->uc_link)
     {
       /* Returning to the next context and next frame.  */
-      sp[-4/sizeof(unsigned long)] = ucp->uc_link->uc_mcontext.sc_gr[30];
-      sp[-20/sizeof(unsigned long)] = ucp->uc_link->uc_mcontext.sc_gr[2];
+      sp[-4 / sizeof (unsigned long)] = ucp->uc_link->uc_mcontext.sc_gr[30];
+      sp[-20 / sizeof (unsigned long)] = ucp->uc_link->uc_mcontext.sc_gr[2];
     }
   else
     {
       /* This is the main context. No frame marker, and no return address.  */
-      sp[-4/sizeof(unsigned long)] = 0x0;
-      sp[-20/sizeof(unsigned long)] = 0x0;
+      sp[-4 / sizeof (unsigned long)] = 0x0;
+      sp[-20 / sizeof (unsigned long)] = 0x0;
     }
 
   /* Store address to jump to.  */
@@ -84,7 +84,7 @@  __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
 	  continue;
 	}
 
-      if ((i < 8) && (sizeof(unsigned long) == 8))
+      if ((i < 8) && (sizeof (unsigned long) == 8))
 	{
 	  /* 64bit: r19-r22 are arg7-arg4.  */
 	  ucp->uc_mcontext.sc_gr[22+4-i] = va_arg (ap, int);
diff --git a/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h b/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h
index 95142401a3..640381a5c7 100644
--- a/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h
@@ -188,7 +188,7 @@  typedef struct ucontext_t
     } uc_mcontext;
     sigset_t    uc_sigmask;
     /* last for extensibility */
-    char __ctx(uc_reg_space)[sizeof(mcontext_t) + 12];
+    char __ctx(uc_reg_space)[sizeof (mcontext_t) + 12];
 #else /* 64-bit */
     sigset_t    uc_sigmask;
     mcontext_t  uc_mcontext;  /* last for extensibility */