X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fuuid.c;h=60d09b513c32d7a960c7990eef43dfeabc02f245;hp=1cb902708239e6e5532d1ab46ece44440550eb79;hb=54619dc85fd308b21ed09a0271e5c7383c7921b9;hpb=c3c9a56e37bac5d5be3b6beb0b33f89ea941295e diff --git a/src/uuid.c b/src/uuid.c index 1cb90270..60d09b51 100644 --- a/src/uuid.c +++ b/src/uuid.c @@ -26,8 +26,8 @@ #include "collectd.h" -#include "common.h" #include "plugin.h" +#include "utils/common/common.h" #if HAVE_SYS_SYSCTL_H #include @@ -37,18 +37,15 @@ #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"}; static int looks_like_a_uuid(const char *uuid) { - int len; - if (!uuid) return 0; - len = strlen(uuid); - + size_t len = strlen(uuid); if (len < UUID_PRINTABLE_COMPACT_LENGTH) return 0;