summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 272fd12)
raw | patch | inline | side by side (parent: 272fd12)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Wed, 4 Aug 2010 12:43:38 +0000 (14:43 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Wed, 4 Aug 2010 12:43:38 +0000 (14:43 +0200) |
src/redis.c | patch | blob | history |
diff --git a/src/redis.c b/src/redis.c
index dfac6d630190cda73e970970d09f3359c5cf8a84..ec69631d65903136392126cf730f87f7ac3cc8bd 100644 (file)
--- a/src/redis.c
+++ b/src/redis.c
status = 0;
if (strcasecmp ("Host", option->key) == 0)
- status = cf_util_get_string_buffer (option, rn->host, HOST_NAME_MAX);
+ status = cf_util_get_string_buffer (option, rn->host, sizeof (rn->host));
else if (strcasecmp ("Port", option->key) == 0)
status = rn->port = cf_util_get_port_number (option);
else if (strcasecmp ("Timeout", option->key) == 0)
memcpy (rn_copy, rn, sizeof (redis_node_t));
if (*rn_copy->name == '\0')
{
- (void) strncpy(rn_copy->name, "default", MAX_REDIS_NODE_NAME); /* in theory never fails */
+ (void) strncpy(rn_copy->name, "default", sizeof (rn_copy->name)); /* in theory never fails */
}
DEBUG ("redis plugin: adding entry `%s' to the tree.", rn_copy->name);
status = redis_node_add (&rn);
}
else if (strcasecmp ("Host", option->key) == 0)
- status = cf_util_get_string_buffer (option, rn.host, HOST_NAME_MAX);
+ status = cf_util_get_string_buffer (option, rn.host, sizeof (rn.host));
else if (strcasecmp ("Port", option->key) == 0)
status = rn.port = cf_util_get_port_number (option);
else if (strcasecmp ("Timeout", option->key) == 0)