summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2013-10-29 03:12:31 +0000
committermarkj <markj@FreeBSD.org>2013-10-29 03:12:31 +0000
commitbb1072d7ef9101f89db4769045b34123c3e344ec (patch)
tree7136523166120efa86014242a892b951a72ef3f5
parent7ec78b8068b101aacbbf56e0c6a1ad783e63c9c2 (diff)
downloadFreeBSD-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
-rw-r--r--lib/libproc/_libproc.h4
-rw-r--r--lib/libproc/proc_util.c3
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))
OpenPOWER on IntegriCloud