ha_logd: Use C99 initializers, also correct max entity string length C99 initializers are more easy to read.
Signed-off-by: Bernd Schubert <bschub...@ddn.com> diff --git a/logd/ha_logd.c b/logd/ha_logd.c --- a/logd/ha_logd.c +++ b/logd/ha_logd.c @@ -87,18 +87,18 @@ static gboolean needs_shutdown = FALSE; static struct { char debugfile[MAXLINE]; char logfile[MAXLINE]; - char entity[MAXLINE]; + char entity[MAXENTITY]; int log_facility; mode_t logmode; gboolean syslogfmtmsgs; } logd_config = { - "", - "", - "logd", - HA_LOG_FACILITY, - 0644, - FALSE + .debugfile = "", + .logfile = "", + .entity = "logd", + .log_facility = HA_LOG_FACILITY, + .logmode = 0644, + .syslogfmtmsgs = FALSE }; static void logd_log(const char * fmt, ...) G_GNUC_PRINTF(1,2); @@ -202,7 +202,7 @@ set_entity(const char * option) return FALSE; } cl_log(LOG_INFO, "setting entity to %s", option); - strncpy(logd_config.entity, option, MAXLINE); + strncpy(logd_config.entity, option, MAXENTITY); return TRUE; } _______________________________________________ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker