X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fuuid.c;h=39b1fe6ffbd22001c77628265629d7fe1faf6831;hp=4846841bb5cc7718b5221f443a0888580007efd8;hb=06a86a60a7dabc685bdbd81ce3d36ea5f7e2c2d4;hpb=65bdbbfb9c6b287de835e5aa81faee8cd864c1e9 diff --git a/src/uuid.c b/src/uuid.c index 4846841b..39b1fe6f 100644 --- a/src/uuid.c +++ b/src/uuid.c @@ -37,7 +37,7 @@ #define UUID_PRINTABLE_COMPACT_LENGTH (UUID_RAW_LENGTH * 2) #define UUID_PRINTABLE_NORMAL_LENGTH (UUID_PRINTABLE_COMPACT_LENGTH + 4) -static char *uuidfile = NULL; +static char *uuidfile; static const char *config_keys[] = {"UUIDFile"}; @@ -193,7 +193,7 @@ static int uuid_init(void) { char *uuid = uuid_get_local(); if (uuid) { - sstrncpy(hostname_g, uuid, DATA_MAX_NAME_LEN); + hostname_set(uuid); sfree(uuid); return 0; }