* vfs.c (mc_get_current_wd): Use g_strlcpy() to avoid unneeded

padding and silence Valgrind.
This commit is contained in:
Pavel Roskin 2003-09-22 19:43:41 +00:00
parent 4014009077
commit cdd8f8ce86
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-09-22 Pavel Roskin <proski@gnu.org>
* vfs.c (mc_get_current_wd): Use g_strlcpy() to avoid unneeded
padding and silence Valgrind.
2003-09-09 Andrew V. Samoilov <sav@bcs.zp.ua>
* samba/libsmb/namequery.c (_interpret_node_status): Comment

View File

@ -651,7 +651,7 @@ mc_get_current_wd (char *buffer, int size)
{
const char *cwd = _vfs_get_cwd ();
strncpy (buffer, cwd, size - 1);
g_strlcpy (buffer, cwd, size - 1);
buffer[size - 1] = 0;
return buffer;
}