Balance braces

* strace.c (proc_open): Avoid unbalanced braces.
(trace): Likewise.
This commit is contained in:
Andreas Schwab 2010-07-09 11:49:27 +02:00
parent 102e69a3ea
commit 372cc84c97

View File

@ -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);
}