Balance braces
* strace.c (proc_open): Avoid unbalanced braces. (trace): Likewise.
This commit is contained in:
parent
102e69a3ea
commit
372cc84c97
10
strace.c
10
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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user