diff options
author | markj <markj@FreeBSD.org> | 2017-04-11 17:36:19 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2017-04-11 17:36:19 +0000 |
commit | ff91e24e3dbc6bef1e9733e4ff344812d7a7b566 (patch) | |
tree | 038220dc9929fe015146022446ff2f0666cd0405 /lib/libproc/proc_util.c | |
parent | 23165228b796c797552517a1e0e624234e8a613e (diff) | |
download | FreeBSD-src-ff91e24e3dbc6bef1e9733e4ff344812d7a7b566.zip FreeBSD-src-ff91e24e3dbc6bef1e9733e4ff344812d7a7b566.tar.gz |
MFC r309591:
Fix style bugs and remove trailing whitespace in libproc and librtld_db.
Diffstat (limited to 'lib/libproc/proc_util.c')
-rw-r--r-- | lib/libproc/proc_util.c | 15 |
1 files changed, 10 insertions, 5 deletions
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 <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + #include <sys/types.h> #include <sys/ptrace.h> #include <sys/wait.h> + #include <err.h> #include <errno.h> #include <signal.h> #include <string.h> #include <unistd.h> + #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 |