]> granicus.if.org Git - strace/commitdiff
Balance braces
authorAndreas Schwab <schwab@redhat.com>
Fri, 9 Jul 2010 09:49:27 +0000 (11:49 +0200)
committerAndreas Schwab <schwab@redhat.com>
Fri, 9 Jul 2010 10:01:17 +0000 (12:01 +0200)
* strace.c (proc_open): Avoid unbalanced braces.
(trace): Likewise.

strace.c

index c83d8af0158b63e57c22e45f61aa169ce61afc53..21febb3519a88ffb11c97dde8b634e1bd25eff3f 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -1087,11 +1087,12 @@ proc_open(struct tcb *tcp, int attaching)
        /* Open the process pseudo-file in /proc. */
 #ifndef FREEBSD
        sprintf(proc, "/proc/%d", tcp->pid);
-       if ((tcp->pfd = open(proc, O_RDWR|O_EXCL)) < 0) {
+       tcp->pfd = open(proc, O_RDWR|O_EXCL);
 #else /* FREEBSD */
        sprintf(proc, "/proc/%d/mem", tcp->pid);
-       if ((tcp->pfd = open(proc, O_RDWR)) < 0) {
+       tcp->pfd = open(proc, O_RDWR);
 #endif /* FREEBSD */
+       if (tcp->pfd < 0) {
                perror("strace: open(\"/proc/...\", ...)");
                return -1;
        }
@@ -2194,10 +2195,11 @@ trace()
                tcp->curcol = curcol;
                arg = 0;
 #ifndef FREEBSD
-               if (IOCTL (tcp->pfd, PIOCRUN, &arg) < 0) {
+               if (IOCTL (tcp->pfd, PIOCRUN, &arg) < 0)
 #else
-               if (IOCTL (tcp->pfd, PIOCRUN, 0) < 0) {
+               if (IOCTL (tcp->pfd, PIOCRUN, 0) < 0)
 #endif
+               {
                        perror("PIOCRUN");
                        exit(1);
                }