]> granicus.if.org Git - strace/commitdiff
Fix defined(FOO) style
authorDenys Vlasenko <vda.linux@googlemail.com>
Sat, 25 Feb 2012 01:47:15 +0000 (02:47 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 25 Feb 2012 01:47:15 +0000 (02:47 +0100)
* file.c: Consistently use defined(FOO) instead of defined (FOO).
* mem.c: Likewise.
* net.c: Likewise.
* signal.c: Likewise.
* sock.c: Likewise.
* linux/mips/syscallent.h: Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
file.c
linux/mips/syscallent.h
mem.c
net.c
signal.c
sock.c

diff --git a/file.c b/file.c
index 7e3e3fbd6b38a6e7b66b5ed2df8caa2b82079417..eef9436a0f22416c85305893e8cbc0dfea344ea3 100644 (file)
--- a/file.c
+++ b/file.c
@@ -501,7 +501,7 @@ static const struct xlat whence[] = {
 };
 
 #ifndef HAVE_LONG_LONG_OFF_T
-#if defined (LINUX_MIPSN32)
+#if defined(LINUX_MIPSN32)
 int
 sys_lseek(struct tcb *tcp)
 {
@@ -781,7 +781,7 @@ printstatsol(struct tcb *tcp, long addr)
                tprints("...}");
 }
 
-#if defined (SPARC64)
+#if defined(SPARC64)
 static void
 printstat_sparc64(struct tcb *tcp, long addr)
 {
@@ -1795,7 +1795,7 @@ sys_fstatfs64(struct tcb *tcp)
 }
 #endif
 
-#if defined(__alpha)
+#if defined(ALPHA)
 int
 osf_statfs(struct tcb *tcp)
 {
index ee28d06683168b5723247ed1689975334682b31f..a6a034047a6db7d74a8d2dd15fe9461182aec18f 100644 (file)
        { 0,    0,      printargs,              "SYS_3997"      }, /* 3997 */
        { 0,    0,      printargs,              "SYS_3998"      }, /* 3998 */
        { 0,    0,      printargs,              "SYS_3999"      }, /* 3999 */ /* end of POSIX */
-#if !defined (LINUX_MIPSN32) && !defined (LINUX_MIPSN64)
+#if !defined(LINUX_MIPSN32) && !defined(LINUX_MIPSN64)
        /* For an O32 strace, decode the o32 syscalls.  */
        { MA,   0,      printargs,              "syscall"       }, /* 4000 */ /* start of Linux o32 */
        { 1,    TP,     sys_exit,               "exit"          }, /* 4001 */
        { 0,    0,      printargs,              "SYS_4997"      }, /* 4997 */
        { 0,    0,      printargs,              "SYS_4998"      }, /* 4998 */
        { 0,    0,      printargs,              "SYS_4999"      }, /* 4999 */ /* end of Linux o32 */
-#if defined (LINUX_MIPSN64)
+#if defined(LINUX_MIPSN64)
        /* For an N64 strace decode the N64 64-bit syscalls.  */
        { 3,    TF,     sys_read,               "read"          }, /* 5000 */ /* start of Linux N64 */
        { 3,    TF,     sys_write,              "write"         }, /* 5001 */
        { 0,    0,      printargs,              "SYS_5998"      }, /* 5998 */
        { 0,    0,      printargs,              "SYS_5999"      }, /* 5999 */ /* end of Linux N64 */
 
-#if defined (LINUX_MIPSN32)
+#if defined(LINUX_MIPSN32)
        /* For an N32 strace decode the N32 64-bit syscalls.  */
        { 3,    TF,     sys_read,               "read"          }, /* 6000 */ /* start of Linux N32 */
        { 3,    TF,     sys_write,              "write"         }, /* 6001 */
diff --git a/mem.c b/mem.c
index 252486ad70fd4f908e45f8d6e4406aaaab75a559..1fc8595f3a8f59b20ef46c581be543b78acef569 100644 (file)
--- a/mem.c
+++ b/mem.c
@@ -584,7 +584,7 @@ sys_getpagesize(struct tcb *tcp)
 }
 #endif
 
-#if defined(__i386__)
+#if defined(I386)
 void
 print_ldt_entry(struct modify_ldt_ldt_s *ldt_entry)
 {
@@ -676,7 +676,7 @@ sys_get_thread_area(struct tcb *tcp)
        return 0;
 
 }
-#endif /* __i386__ */
+#endif /* I386 */
 
 #if defined(M68K)
 int
diff --git a/net.c b/net.c
index 3955f1688fb7952430f33bc492f5f26e6f5a0bf5..2aecc3658e6c279f4a9b50ffe54e32cb81049bf7 100644 (file)
--- a/net.c
+++ b/net.c
@@ -61,7 +61,7 @@
 #  include <linux/ipx.h>
 #endif
 
-#if defined (__GLIBC__) && (((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 1)) || defined(HAVE_SIN6_SCOPE_ID_LINUX))
+#if defined(__GLIBC__) && (((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 1)) || defined(HAVE_SIN6_SCOPE_ID_LINUX))
 #if defined(HAVE_LINUX_IN6_H)
 #if defined(HAVE_SIN6_SCOPE_ID_LINUX)
 #undef in6_addr
@@ -724,7 +724,7 @@ static const struct xlat sockoptions[] = {
        { 0,            NULL            },
 };
 
-#if !defined (SOL_IP) && defined (IPPROTO_IP)
+#if !defined(SOL_IP) && defined(IPPROTO_IP)
 #define SOL_IP IPPROTO_IP
 #endif
 
@@ -1071,7 +1071,7 @@ static const struct xlat socksctpoptions[] = {
 };
 #endif
 
-#if  !defined (SOL_TCP) && defined (IPPROTO_TCP)
+#if !defined(SOL_TCP) && defined(IPPROTO_TCP)
 #define SOL_TCP IPPROTO_TCP
 #endif
 
index eab5c52288f3fb18d51811b914b78d381821e732..89a44ffe889debe79076d3b68a97802d35550c7a 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -1010,7 +1010,7 @@ sys_sigreturn(struct tcb *tcp)
                tprints(sprintsigmask(") (mask ", &sigm, 0));
        }
        return 0;
-#elif defined (SPARC) || defined (SPARC64)
+#elif defined(SPARC) || defined(SPARC64)
        if (entering(tcp)) {
                long i1;
                struct pt_regs regs;
@@ -1029,7 +1029,7 @@ sys_sigreturn(struct tcb *tcp)
                tprints(sprintsigmask(") (mask ", &sigm, 0));
        }
        return 0;
-#elif defined (LINUX_MIPSN32) || defined (LINUX_MIPSN64)
+#elif defined(LINUX_MIPSN32) || defined(LINUX_MIPSN64)
        /* This decodes rt_sigreturn.  The 64-bit ABIs do not have
           sigreturn.  */
        if (entering(tcp)) {
diff --git a/sock.c b/sock.c
index 89fc1ccf4b7a2c503c91d8030d872bea72b3d4b3..25e47a9c78be95085b5c07bf8f94c81f07129a00 100644 (file)
--- a/sock.c
+++ b/sock.c
 #include <linux/sockios.h>
 #include <arpa/inet.h>
 
-#if defined (ALPHA) || defined(SH) || defined(SH64)
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#elif defined(HAVE_IOCTLS_H)
-#include <ioctls.h>
-#endif
+#if defined(ALPHA) || defined(SH) || defined(SH64)
+# ifdef HAVE_SYS_IOCTL_H
+#  include <sys/ioctl.h>
+# elif defined(HAVE_IOCTLS_H)
+#  include <ioctls.h>
+# endif
 #endif
 #include <net/if.h>