avoid compiler/linker warnings

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32483 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2011-03-07 11:34:17 +00:00
parent ab4587dbcf
commit dbaa646d12
23 changed files with 271 additions and 167 deletions

View file

@ -280,7 +280,8 @@ myHostName()
}
else if (name == nil || strcmp(old, buf) != 0)
{
strcpy(old, buf);
strncpy(old, buf, sizeof(old) - 1);
old[sizeof(old) - 1] = '\0';
RELEASE(name);
name = [[NSString alloc] initWithCString: buf];
}