mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Tidied.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13482 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d8985d2652
commit
16cff5f0cf
1 changed files with 3 additions and 2 deletions
|
@ -145,7 +145,7 @@ static NSProcessInfo *_gnu_sharedProcessInfoObject = nil;
|
|||
// Host name of the CPU executing the process
|
||||
static NSString *_gnu_hostName = nil;
|
||||
|
||||
static const char *_gnu_arg_zero = nil;
|
||||
static char *_gnu_arg_zero = 0;
|
||||
|
||||
// Current process name
|
||||
static NSString *_gnu_processName = nil;
|
||||
|
@ -169,7 +169,8 @@ _gnu_process_args(int argc, char *argv[], char *env[])
|
|||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
int i;
|
||||
|
||||
_gnu_arg_zero = argv[0];
|
||||
_gnu_arg_zero = (char*)malloc(strlen(argv[0]) + 1);
|
||||
strcpy(_gnu_arg_zero, argv[0]);
|
||||
|
||||
/* Getting the process name */
|
||||
_gnu_processName = [[NSString stringWithCString: argv[0]] lastPathComponent];
|
||||
|
|
Loading…
Reference in a new issue