diff --git a/drivers/snmp-ups.c b/drivers/snmp-ups.c index ba9f5438e2..65a19397dc 100644 --- a/drivers/snmp-ups.c +++ b/drivers/snmp-ups.c @@ -1783,6 +1783,8 @@ void su_alarm_set(snmp_info_t *su_info_p, long value) if ((info_value = su_find_infoval(su_info_p->oid2info, &value)) != NULL && info_value[0] != 0) { + char alarm_info_value_more[SU_LARGEBUF + 32]; /* can sprintf() SU_LARGEBUF plus markup into here */ + /* Special handling for outlet & outlet groups alarms */ if ((su_info_p->flags & SU_OUTLET) || (su_info_p->flags & SU_OUTLET_GROUP)) { @@ -1803,7 +1805,6 @@ void su_alarm_set(snmp_info_t *su_info_p, long value) * start of path */ if (info_type[0] == 'L') { /* Extract phase number */ - char alarm_info_value_more[SU_LARGEBUF + 32]; /* can sprintf() SU_LARGEBUF plus markup into here */ item_number = atoi(info_type+1);