From 1a344d488aae20da1fbe9ba66a70f0fe37da7274 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Thu, 11 Apr 2019 23:07:41 +0900 Subject: [PATCH] Use sizeof() consistently --- configfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configfile.c b/configfile.c index dde59516..09b21bef 100644 --- a/configfile.c +++ b/configfile.c @@ -344,7 +344,7 @@ _parse_config(t_configuration_options *options, ItemList *error_list, ItemList * options->failover = FAILOVER_MANUAL; options->priority = DEFAULT_PRIORITY; memset(options->location, 0, sizeof(options->location)); - strncpy(options->location, DEFAULT_LOCATION, MAXLEN); + strncpy(options->location, DEFAULT_LOCATION, sizeof(options->location)); memset(options->promote_command, 0, sizeof(options->promote_command)); memset(options->follow_command, 0, sizeof(options->follow_command)); options->monitor_interval_secs = DEFAULT_MONITORING_INTERVAL;