aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--paludis/util/persona.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/paludis/util/persona.cc b/paludis/util/persona.cc
index 817ea960b..3964356cf 100644
--- a/paludis/util/persona.cc
+++ b/paludis/util/persona.cc
@@ -75,10 +75,10 @@ namespace paludis
length =
initial_buffer_size<_SC_GETPW_R_SIZE_MAX>("accounts.getpw_r_size");
- for (buffer.reserve(length);
+ for (buffer.resize(length);
(rv = ::getpwnam_r(name, &pwd, buffer.data(), buffer.capacity(),
&result)) == ERANGE;
- buffer.reserve(length))
+ buffer.resize(length))
length = length * 2;
return rv;
@@ -95,10 +95,10 @@ namespace paludis
length =
initial_buffer_size<_SC_GETGR_R_SIZE_MAX>("accounts.getgr_r_size");
- for (buffer.reserve(length);
+ for (buffer.resize(length);
(rv = ::getgrgid_r(gid, &grp, buffer.data(), buffer.capacity(),
&result)) == ERANGE;
- buffer.reserve(length))
+ buffer.resize(length))
length = length * 2;
return rv;
@@ -115,10 +115,10 @@ namespace paludis
length =
initial_buffer_size<_SC_GETPW_R_SIZE_MAX>("accounts.getpw_r_size");
- for (buffer.reserve(length);
+ for (buffer.resize(length);
(rv = ::getpwuid_r(uid, &pwd, buffer.data(), buffer.capacity(),
&result)) == ERANGE;
- buffer.reserve(length))
+ buffer.resize(length))
length = length * 2;
return rv;