diff options
author | Kevin Lo <kevlo@cvs.openbsd.org> | 2008-10-01 00:55:11 +0000 |
---|---|---|
committer | Kevin Lo <kevlo@cvs.openbsd.org> | 2008-10-01 00:55:11 +0000 |
commit | e08d7ffe0039c40967b02171e7374f2e572d3e0e (patch) | |
tree | fec1fc9310ecb3f1bddfdc034880e9f9f70d7f10 /usr.bin | |
parent | 504cc5bb584118cac5af889e571140504cc235e8 (diff) |
in getrusage(), use RUSAGE_SELF for the current process rather than 0
ok millert@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/locate/locate/locate.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 <wosch@FreeBSD.org>. 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 */ |