From: Denys Vlasenko Date: Mon, 27 Feb 2012 12:56:59 +0000 (+0100) Subject: Style fixes, no code changes X-Git-Tag: v4.7~149 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b237b1b20da4ff40efb919f9d4a6458a05f375ca;p=strace Style fixes, no code changes * 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 --- diff --git a/desc.c b/desc.c index 9776ed69..a207d2fe 100644 --- 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 cec7afde..69b3c84b 100644 --- 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 888077a3..266d9c17 100644 --- 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; diff --git a/process.c b/process.c index f6d59227..de305144 100644 --- 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;