X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fredis.c;h=9282e1938a3263601ad674e7f3dcad45f75be544;hb=00f9279d9711c9882b65d54fd72c2f25a3f403fc;hp=7864ead07c01c1edf079cecfb9c79474470cb277;hpb=59547eb66a3743ca0b458222d7a4318f3e659a60;p=collectd.git diff --git a/src/redis.c b/src/redis.c index 7864ead0..9282e193 100644 --- a/src/redis.c +++ b/src/redis.c @@ -141,7 +141,7 @@ static redis_query_t *redis_config_query (oconfig_item_t *ci) /* {{{ */ * Default to a gauge type. */ (void)strncpy(rq->type, "gauge", sizeof(rq->type)); - (void)strncpy(rq->instance, rq->query, sizeof(rq->instance)); + (void)sstrncpy(rq->instance, rq->query, sizeof(rq->instance)); replace_special(rq->instance, sizeof(rq->instance)); for (i = 0; i < ci->children_num; i++) { @@ -304,7 +304,7 @@ int redis_handle_info (char *node, char const *info_line, char const *type, char int i; str += strlen (field_name) + 1; /* also skip the ':' */ - for(i=0;(*str && (isdigit(*str) || *str == '.'));i++,str++) + for(i=0;(*str && (isdigit((unsigned char)*str) || *str == '.'));i++,str++) buf[i] = *str; buf[i] ='\0';