Skip to content

Commit

Permalink
Use sizeof() consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
ibarwick committed Apr 11, 2019
1 parent 46d17d0 commit 1a344d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configfile.c
Expand Up @@ -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;
Expand Down

0 comments on commit 1a344d4

Please sign in to comment.