]> granicus.if.org Git - strace/commitdiff
Style fixes, no code changes
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 27 Feb 2012 12:56:59 +0000 (13:56 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 27 Feb 2012 12:56:59 +0000 (13:56 +0100)
* desc.c (sys_io_getevents): Indentation fix.
* file.c (sys_xstat): Remove space after function name.
(decode_mknod): Indentation fix.
* net.c (printsockopt): Indentation fix.
* process.c (unalignctl_string): Indentation fix.
(sys_sched_getscheduler): Remove space after ! operator.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
desc.c
file.c
net.c
process.c

diff --git a/desc.c b/desc.c
index 9776ed69862e74cfd5a4c67fabac24b6c29f9ff4..a207d2fe130d5f6095fb7f59e7ab5d89c945e188 100644 (file)
--- a/desc.c
+++ b/desc.c
@@ -1011,7 +1011,7 @@ sys_io_getevents(struct tcb *tcp)
                        }
                        tprints("}, ");
 #else
-                               tprints("{...}");
+                       tprints("{...}");
 #endif
                }
 
diff --git a/file.c b/file.c
index cec7afdeeee0d9d3990069de9958b2f7b3f5c1c7..69b3c84bb12ec0a438467dd085bccf8c4af486c9 100644 (file)
--- a/file.c
+++ b/file.c
@@ -1385,7 +1385,7 @@ sys_xstat(struct tcb *tcp)
        } else {
 # ifdef _STAT64_VER
                if (tcp->u_arg[0] == _STAT64_VER)
-                       printstat64 (tcp, tcp->u_arg[2]);
+                       printstat64(tcp, tcp->u_arg[2]);
                else
 # endif
                printstat(tcp, tcp->u_arg[2]);
@@ -1401,7 +1401,7 @@ sys_fxstat(struct tcb *tcp)
        else {
 # ifdef _STAT64_VER
                if (tcp->u_arg[0] == _STAT64_VER)
-                       printstat64 (tcp, tcp->u_arg[2]);
+                       printstat64(tcp, tcp->u_arg[2]);
                else
 # endif
                printstat(tcp, tcp->u_arg[2]);
@@ -1419,7 +1419,7 @@ sys_lxstat(struct tcb *tcp)
        } else {
 # ifdef _STAT64_VER
                if (tcp->u_arg[0] == _STAT64_VER)
-                       printstat64 (tcp, tcp->u_arg[2]);
+                       printstat64(tcp, tcp->u_arg[2]);
                else
 # endif
                printstat(tcp, tcp->u_arg[2]);
@@ -2125,15 +2125,16 @@ decode_mknod(struct tcb *tcp, int offset)
                printpath(tcp, tcp->u_arg[offset]);
                tprintf(", %s", sprintmode(mode));
                switch (mode & S_IFMT) {
-               case S_IFCHR: case S_IFBLK:
+               case S_IFCHR:
+               case S_IFBLK:
 #ifdef LINUXSPARC
                        if (current_personality == 1)
-                       tprintf(", makedev(%lu, %lu)",
+                               tprintf(", makedev(%lu, %lu)",
                                (unsigned long) ((tcp->u_arg[offset + 2] >> 18) & 0x3fff),
                                (unsigned long) (tcp->u_arg[offset + 2] & 0x3ffff));
                        else
 #endif
-                       tprintf(", makedev(%lu, %lu)",
+                               tprintf(", makedev(%lu, %lu)",
                                (unsigned long) major(tcp->u_arg[offset + 2]),
                                (unsigned long) minor(tcp->u_arg[offset + 2]));
                        break;
diff --git a/net.c b/net.c
index 888077a30b65f539168f66c1e9d94cf649748335..266d9c17f525b556d9ba784369b9245b8fa2fb24 100644 (file)
--- a/net.c
+++ b/net.c
@@ -2106,10 +2106,10 @@ printsockopt(struct tcb *tcp, int level, int name, long addr, int len)
                printxval(sockrawoptions, name, "RAW_???");
                switch (name) {
 #if defined(ICMP_FILTER)
-                   case ICMP_FILTER:
-                       tprints(", ");
-                       printicmpfilter(tcp, addr);
-                       return 0;
+                       case ICMP_FILTER:
+                               tprints(", ");
+                               printicmpfilter(tcp, addr);
+                               return 0;
 #endif
                }
                break;
index f6d5922725543804c2f24acd48c150314c0c641d..de305144189bc07d8db11003014874f6adaf77fe 100644 (file)
--- a/process.c
+++ b/process.c
@@ -241,19 +241,19 @@ static const struct xlat prctl_options[] = {
 static const char *
 unalignctl_string(unsigned int ctl)
 {
-       static char buf[16];
+       static char buf[sizeof(int)*2 + 2];
 
        switch (ctl) {
 #ifdef PR_UNALIGN_NOPRINT
-             case PR_UNALIGN_NOPRINT:
-               return "NOPRINT";
+               case PR_UNALIGN_NOPRINT:
+                       return "NOPRINT";
 #endif
 #ifdef PR_UNALIGN_SIGBUS
-             case PR_UNALIGN_SIGBUS:
-               return "SIGBUS";
+               case PR_UNALIGN_SIGBUS:
+                       return "SIGBUS";
 #endif
-             default:
-               break;
+               default:
+                       break;
        }
        sprintf(buf, "%x", ctl);
        return buf;
@@ -2745,7 +2745,7 @@ sys_sched_getscheduler(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%d", (int) tcp->u_arg[0]);
-       } else if (! syserror(tcp)) {
+       } else if (!syserror(tcp)) {
                tcp->auxstr = xlookup(schedulers, tcp->u_rval);
                if (tcp->auxstr != NULL)
                        return RVAL_STR;