From 420cd21c9460cf28a7eff7f16014fc8f83a79061 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Wed, 18 Aug 2010 03:43:02 +0000 Subject: [PATCH] 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 --- src/apps/terminal/Shell.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/terminal/Shell.cpp b/src/apps/terminal/Shell.cpp index 4994584c93..52250ceeac 100644 --- a/src/apps/terminal/Shell.cpp +++ b/src/apps/terminal/Shell.cpp @@ -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}; + struct passwd passwdStruct; + struct passwd *passwdResult; + char stringBuffer[256]; if (argv == NULL || argc == 0) { - struct passwd passwdStruct; - struct passwd *passwdResult; - char stringBuffer[256]; if (!getpwuid_r(getuid(), &passwdStruct, stringBuffer, sizeof(stringBuffer), &passwdResult)) { defaultArgs[0] = passwdStruct.pw_shell;