From e08d7ffe0039c40967b02171e7374f2e572d3e0e Mon Sep 17 00:00:00 2001 From: Kevin Lo Date: Wed, 1 Oct 2008 00:55:11 +0000 Subject: in getrusage(), use RUSAGE_SELF for the current process rather than 0 ok millert@ --- usr.bin/locate/locate/locate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/locate/locate/locate.c b/usr.bin/locate/locate/locate.c index 4ce89815571..de9715e239e 100644 --- a/usr.bin/locate/locate/locate.c +++ b/usr.bin/locate/locate/locate.c @@ -1,5 +1,5 @@ /* - * $OpenBSD: locate.c,v 1.21 2008/07/26 10:57:09 jmc Exp $ + * $OpenBSD: locate.c,v 1.22 2008/10/01 00:55:10 kevlo Exp $ * * Copyright (c) 1995 Wolfram Schneider . Berlin. * Copyright (c) 1989, 1993 @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: locate.c,v 1.21 2008/07/26 10:57:09 jmc Exp $ + * $Id: locate.c,v 1.22 2008/10/01 00:55:10 kevlo Exp $ */ #ifndef lint @@ -46,7 +46,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)locate.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: locate.c,v 1.21 2008/07/26 10:57:09 jmc Exp $"; +static char rcsid[] = "$OpenBSD: locate.c,v 1.22 2008/10/01 00:55:10 kevlo Exp $"; #endif #endif /* not lint */ @@ -329,7 +329,7 @@ cputime(void) { struct rusage rus; - getrusage(0, &rus); + getrusage(RUSAGE_SELF, &rus); return(rus.ru_utime.tv_sec * 1000 + rus.ru_utime.tv_usec / 1000); } #endif /* DEBUG */ -- cgit v1.2.3