1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

common: Null terminate process name string so valgrind doesn't complain

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 1c9025fdd08d1cea342af7487d0123015e08831b)
This commit is contained in:
Amitay Isaacs 2013-08-02 11:05:08 +10:00
parent ae30b61255
commit 3c0a477911

View File

@ -606,6 +606,7 @@ int ctdb_set_process_name(const char *name)
char procname[16];
strncpy(procname, name, 15);
procname[15] = '\0';
return prctl(PR_SET_NAME, (unsigned long)procname, 0, 0, 0);
}