projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
network plugin: Fix compile ifndef HAVE_GCRYPT_H
[collectd.git]
/
src
/
uuid.c
diff --git
a/src/uuid.c
b/src/uuid.c
index
d54301a
..
e0de0d9
100644
(file)
--- a/
src/uuid.c
+++ b/
src/uuid.c
@@
-257,8
+257,7
@@
uuid_init (void)
char *uuid = uuid_get_local ();
if (uuid) {
- strncpy (hostname_g, uuid, DATA_MAX_NAME_LEN);
- hostname_g[DATA_MAX_NAME_LEN-1] = '\0';
+ sstrncpy (hostname_g, uuid, DATA_MAX_NAME_LEN);
sfree (uuid);
return 0;
}