Merge "Fix format-truncation warnings"
This commit is contained in:
commit
9a55e5606c
|
@ -163,7 +163,7 @@ void hbs_cluster_log ( string & hostname,
|
||||||
if ( cluster.history[h].entries == MTCE_HBS_HISTORY_ENTRIES )
|
if ( cluster.history[h].entries == MTCE_HBS_HISTORY_ENTRIES )
|
||||||
{
|
{
|
||||||
#define MAX_CLUSTER_LINE_LEN 100
|
#define MAX_CLUSTER_LINE_LEN 100
|
||||||
#define MAX_ENTRY_STR_LEN 10 /* "9999:9999 " */
|
#define MAX_ENTRY_STR_LEN 13 /* "9999:9999 " */
|
||||||
mtce_hbs_cluster_entry_type e = { 0, 0 } ;
|
mtce_hbs_cluster_entry_type e = { 0, 0 } ;
|
||||||
char str[MAX_CLUSTER_LINE_LEN] ;
|
char str[MAX_CLUSTER_LINE_LEN] ;
|
||||||
string line = "";
|
string line = "";
|
||||||
|
|
|
@ -257,15 +257,7 @@ int hwmon_alarm_util ( string & hostname,
|
||||||
"%s is reporting a '%s' out-of-tolerance reading from the '%s' sensor",
|
"%s is reporting a '%s' out-of-tolerance reading from the '%s' sensor",
|
||||||
hostname.c_str(), _getSev_str (severity).c_str(), sub_entity.c_str());
|
hostname.c_str(), _getSev_str (severity).c_str(), sub_entity.c_str());
|
||||||
|
|
||||||
if ( state == FM_ALARM_STATE_CLEAR )
|
if ( state == FM_ALARM_STATE_MSG )
|
||||||
{
|
|
||||||
snprintf(alarm.reason_text, FM_MAX_BUFFER_LENGTH,
|
|
||||||
"%s:%s alarm clear\n",
|
|
||||||
alarm.alarm_id,
|
|
||||||
alarm.entity_instance_id);
|
|
||||||
hostname_prefix_in_reason = false ;
|
|
||||||
}
|
|
||||||
else if ( state == FM_ALARM_STATE_MSG )
|
|
||||||
{
|
{
|
||||||
if ( severity == FM_ALARM_SEVERITY_WARNING )
|
if ( severity == FM_ALARM_SEVERITY_WARNING )
|
||||||
{
|
{
|
||||||
|
|
|
@ -540,6 +540,11 @@ bool service_file_exists ( string service_filename,
|
||||||
char * path_n_name_ptr,
|
char * path_n_name_ptr,
|
||||||
int max_len )
|
int max_len )
|
||||||
{
|
{
|
||||||
|
if ( path_n_name_ptr == NULL ) {
|
||||||
|
slog ("Path for service files search is null.\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* load the name of the service file */
|
/* load the name of the service file */
|
||||||
snprintf ( path_n_name_ptr, max_len, "%s/%s",
|
snprintf ( path_n_name_ptr, max_len, "%s/%s",
|
||||||
SYSTEMD_SERVICE_FILE_DIR1,
|
SYSTEMD_SERVICE_FILE_DIR1,
|
||||||
|
|
Loading…
Reference in New Issue