This commit is contained in:
Mirek Fidler 2026-07-31 11:17:00 +02:00
commit d55c26da69
2 changed files with 7 additions and 10 deletions

View file

@ -730,13 +730,13 @@ String GetUserName()
::GetUserNameW(temp, &w);
return temp;
#else
size_t bsz = 1024;
Buffer<char> buf(bsz);
struct passwd pwd;
struct passwd *result = NULL;
int rc;
while((rc = getpwuid_r(getuid(), &pwd, buf, bsz, &result)) == ERANGE)
buf.Alloc(bsz *= 2);
size_t bsz = 1024;
Buffer<char> buf(bsz);
struct passwd pwd;
struct passwd *result = NULL;
int rc;
while((rc = getpwuid_r(getuid(), &pwd, buf, bsz, &result)) == ERANGE)
buf.Alloc(bsz *= 2);
return rc == 0 && result ? pwd.pw_name : "";
#endif

View file

@ -173,9 +173,6 @@ void Gdb::Autos()
for(;;) {
if(p.Char('.') && p.IsId())
exp << '.';
else
if(p.Char2('-', '>') && p.IsId())
exp << "->";
else
break;
exp << p.ReadId();