aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-05-17 12:10:07 -0500
committerRob Landley <rob@landley.net>2016-05-17 12:10:07 -0500
commit6d50d4cbbf6ff34ed68dba61d30c434b57b23332 (patch)
tree68dfe801c6a0f09f51a54d72bf957998031b35e4 /toys
parent713055b349b2e6adc7ada2640cd7a40b3d311fb6 (diff)
downloadtoybox-6d50d4cbbf6ff34ed68dba61d30c434b57b23332.tar.gz
Add bufgetpwuid. (Repeated calls to getpwuid() are really expensive.)
Diffstat (limited to 'toys')
-rw-r--r--toys/posix/ps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/ps.c b/toys/posix/ps.c
index 9557b64d..445228fd 100644
--- a/toys/posix/ps.c
+++ b/toys/posix/ps.c
@@ -453,7 +453,7 @@ static char *string_field(struct carveup *tb, struct strawberry *field)
if (gr) out = gr->gr_name;
} else {
- struct passwd *pw = getpwuid(ll);
+ struct passwd *pw = bufgetpwuid(ll);
if (pw) out = pw->pw_name;
}