diff options
author | markj <markj@FreeBSD.org> | 2013-10-29 03:12:31 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2013-10-29 03:12:31 +0000 |
commit | bb1072d7ef9101f89db4769045b34123c3e344ec (patch) | |
tree | 7136523166120efa86014242a892b951a72ef3f5 /lib/libproc | |
parent | 7ec78b8068b101aacbbf56e0c6a1ad783e63c9c2 (diff) | |
download | FreeBSD-src-bb1072d7ef9101f89db4769045b34123c3e344ec.zip FreeBSD-src-bb1072d7ef9101f89db4769045b34123c3e344ec.tar.gz |
Revert r257248 and fix the problem in a way that doesn't violate style(9).
Suggested by: jmg
Diffstat (limited to 'lib/libproc')
-rw-r--r-- | lib/libproc/_libproc.h | 4 | ||||
-rw-r--r-- | lib/libproc/proc_util.c | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/libproc/_libproc.h b/lib/libproc/_libproc.h index a650f45..8099ba1 100644 --- a/lib/libproc/_libproc.h +++ b/lib/libproc/_libproc.h @@ -52,6 +52,6 @@ struct proc_handle { #define DPRINTF(...) warn(__VA_ARGS__) #define DPRINTFX(...) warnx(__VA_ARGS__) #else -#define DPRINTF(...) -#define DPRINTFX(...) +#define DPRINTF(...) do { } while (0) +#define DPRINTFX(...) do { } while (0) #endif diff --git a/lib/libproc/proc_util.c b/lib/libproc/proc_util.c index 646ee97..1c3d522 100644 --- a/lib/libproc/proc_util.c +++ b/lib/libproc/proc_util.c @@ -145,9 +145,8 @@ proc_wstatus(struct proc_handle *phdl) if (phdl == NULL) return (-1); if (waitpid(phdl->pid, &status, WUNTRACED) < 0) { - if (errno != EINTR) { + if (errno != EINTR) DPRINTF("waitpid"); - } return (-1); } if (WIFSTOPPED(status)) |