summaryrefslogtreecommitdiffstats
path: root/usr.bin/locate
diff options
context:
space:
mode:
authorkevlo <kevlo@FreeBSD.org>2008-09-02 02:59:38 +0000
committerkevlo <kevlo@FreeBSD.org>2008-09-02 02:59:38 +0000
commit3fe0cc5a82e4ca92f9ccaa2978f1b9cc6efc5351 (patch)
tree5bf24fb960e4802f7e5727ace6f280d15d63cc2a /usr.bin/locate
parent50b997c3ef37a1ddf001ca0d904e14d196e8ed03 (diff)
downloadFreeBSD-src-3fe0cc5a82e4ca92f9ccaa2978f1b9cc6efc5351.zip
FreeBSD-src-3fe0cc5a82e4ca92f9ccaa2978f1b9cc6efc5351.tar.gz
Use RUSAGE_SELF for the current process instead of hardcoded value
Diffstat (limited to 'usr.bin/locate')
-rw-r--r--usr.bin/locate/locate/locate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/locate/locate/locate.c b/usr.bin/locate/locate/locate.c
index 64ce7f9..d7529fb 100644
--- a/usr.bin/locate/locate/locate.c
+++ b/usr.bin/locate/locate/locate.c
@@ -325,7 +325,7 @@ cputime ()
{
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 */
OpenPOWER on IntegriCloud