-static const char *config_keys[] =
-{
- "Host",
- "Port"
-};
-static int config_keys_num = STATIC_ARRAY_SIZE (config_keys);
-
-static char *config_host = NULL;
-static char *config_port = NULL;
-
-static TCRDB *rdb = NULL;
-
-static int tt_config (const char *key, const char *value)
-{
- if (strcasecmp ("Host", key) == 0)
- {
- char *temp;
-
- temp = strdup (value);
- if (temp == NULL)
- {
- ERROR("tokyotyrant plugin: Host strdup failed.");
- return (1);
- }
- sfree (config_host);
- config_host = temp;
- }
- else if (strcasecmp ("Port", key) == 0)
- {
- char *temp;
-
- temp = strdup (value);
- if (temp == NULL)
- {
- ERROR("tokyotyrant plugin: Port strdup failed.");
- return (1);
- }
- sfree (config_port);
- config_port = temp;
- }
- else
- {
- ERROR ("tokyotyrant plugin: error: unrecognized configuration key %s", key);
- return (-1);
- }
-
- return (0);
+static const char *config_keys[] = {"Host", "Port"};
+static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
+
+static char *config_host;
+static char *config_port;
+
+static TCRDB *rdb;
+
+static int tt_config(const char *key, const char *value) {
+ if (strcasecmp("Host", key) == 0) {
+ char *temp;
+
+ temp = strdup(value);
+ if (temp == NULL) {
+ ERROR("tokyotyrant plugin: Host strdup failed.");
+ return 1;
+ }
+ sfree(config_host);
+ config_host = temp;
+ } else if (strcasecmp("Port", key) == 0) {
+ char *temp;
+
+ temp = strdup(value);
+ if (temp == NULL) {
+ ERROR("tokyotyrant plugin: Port strdup failed.");
+ return 1;
+ }
+ sfree(config_port);
+ config_port = temp;
+ } else {
+ ERROR("tokyotyrant plugin: error: unrecognized configuration key %s", key);
+ return -1;
+ }
+
+ return 0;