From ff91e24e3dbc6bef1e9733e4ff344812d7a7b566 Mon Sep 17 00:00:00 2001 From: markj Date: Tue, 11 Apr 2017 17:36:19 +0000 Subject: MFC r309591: Fix style bugs and remove trailing whitespace in libproc and librtld_db. --- lib/libproc/proc_util.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'lib/libproc/proc_util.c') diff --git a/lib/libproc/proc_util.c b/lib/libproc/proc_util.c index 4d9aa20..8a461c3 100644 --- a/lib/libproc/proc_util.c +++ b/lib/libproc/proc_util.c @@ -2,7 +2,7 @@ * Copyright (c) 2010 The FreeBSD Foundation * Copyright (c) 2008 John Birrell (jb@freebsd.org) * All rights reserved. - * + * * Portions of this software were developed by Rui Paulo under sponsorship * from the FreeBSD Foundation. * @@ -26,18 +26,21 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include + #include #include #include #include #include + #include "_libproc.h" int @@ -58,13 +61,15 @@ proc_clearflags(struct proc_handle *phdl, int mask) int proc_continue(struct proc_handle *phdl) { - int pending = 0; + int pending; if (phdl == NULL) return (-1); if (phdl->status == PS_STOP && WSTOPSIG(phdl->wstat) != SIGTRAP) pending = WSTOPSIG(phdl->wstat); + else + pending = 0; if (ptrace(PT_CONTINUE, phdl->pid, (caddr_t)(uintptr_t)1, pending) != 0) return (-1); @@ -104,7 +109,7 @@ proc_getflags(struct proc_handle *phdl) if (phdl == NULL) return (-1); - return(phdl->flags); + return (phdl->flags); } int -- cgit v1.1