Move the password structs outside of the inner block as well. Fixes #6464.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38221 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent 2010-08-18 03:43:02 +00:00
parent de8a0836ac
commit 420cd21c94

View File

@ -338,10 +338,10 @@ status_t
Shell::_Spawn(int row, int col, const char *encoding, int argc, const char **argv)
{
const char* defaultArgs[3] = {kDefaultShell, "-l", NULL};
if (argv == NULL || argc == 0) {
struct passwd passwdStruct;
struct passwd *passwdResult;
char stringBuffer[256];
if (argv == NULL || argc == 0) {
if (!getpwuid_r(getuid(), &passwdStruct, stringBuffer,
sizeof(stringBuffer), &passwdResult)) {
defaultArgs[0] = passwdStruct.pw_shell;