mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
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:
parent
695c2d279c
commit
96e48988fc
23 changed files with 271 additions and 167 deletions
|
@ -1511,7 +1511,8 @@ NSUserName(void)
|
|||
|
||||
[gnustep_global_lock lock];
|
||||
pwent = getpwuid (uid);
|
||||
strcpy(buf, pwent->pw_name);
|
||||
strncpy(buf, pwent->pw_name, sizeof(buf) - 1);
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
[gnustep_global_lock unlock];
|
||||
loginName = buf;
|
||||
#endif /* HAVE_GETPWUID */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue