X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fuuid.c;h=c7878c74dd54a7836bfdc08329e0ae77ab6aa639;hb=7f07c55bac640c7a50d516248a3152235a14af59;hp=1cb902708239e6e5532d1ab46ece44440550eb79;hpb=9fa98875d6cf81b20c03156ccaf7f081dfa7d1a5;p=collectd.git diff --git a/src/uuid.c b/src/uuid.c index 1cb90270..c7878c74 100644 --- a/src/uuid.c +++ b/src/uuid.c @@ -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;