diff options
author | Ton Voon <ton.voon@opsera.com> | 2010-06-17 10:16:43 +0100 |
---|---|---|
committer | tonvoon <ton.voon@opsera.com> | 2010-06-23 13:30:34 +0000 |
commit | 18f6835edaf7d640a2c9e476cb1babdbdadbfd9b (patch) | |
tree | ae11f40e48dc34658445c99012726f32bfb45c56 /gl/regex_internal.c | |
parent | f61412478ceb7c821793c8356b936f64066508bf (diff) | |
download | monitoring-plugins-18f6835edaf7d640a2c9e476cb1babdbdadbfd9b.tar.gz |
Added state retention APIs. Implemented for check_snmp with --rate option.
See http://nagiosplugin.org/c-api-private for more details on the API.
Also updated check_snmp -l option to change the perfdata label.
Diffstat (limited to 'gl/regex_internal.c')
-rw-r--r-- | gl/regex_internal.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gl/regex_internal.c b/gl/regex_internal.c index 17eafaa9..98b8d5d2 100644 --- a/gl/regex_internal.c +++ b/gl/regex_internal.c | |||
@@ -733,15 +733,17 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) | |||
733 | mbstate_t cur_state; | 733 | mbstate_t cur_state; |
734 | wchar_t wc2; | 734 | wchar_t wc2; |
735 | Idx mlen = raw + pstr->len - p; | 735 | Idx mlen = raw + pstr->len - p; |
736 | unsigned char buf[6]; | ||
737 | size_t mbclen; | 736 | size_t mbclen; |
738 | 737 | ||
738 | #if 0 /* dead code: buf is set but never used */ | ||
739 | unsigned char buf[6]; | ||
739 | if (BE (pstr->trans != NULL, 0)) | 740 | if (BE (pstr->trans != NULL, 0)) |
740 | { | 741 | { |
741 | int i = mlen < 6 ? mlen : 6; | 742 | int i = mlen < 6 ? mlen : 6; |
742 | while (--i >= 0) | 743 | while (--i >= 0) |
743 | buf[i] = pstr->trans[p[i]]; | 744 | buf[i] = pstr->trans[p[i]]; |
744 | } | 745 | } |
746 | #endif | ||
745 | /* XXX Don't use mbrtowc, we know which conversion | 747 | /* XXX Don't use mbrtowc, we know which conversion |
746 | to use (UTF-8 -> UCS4). */ | 748 | to use (UTF-8 -> UCS4). */ |
747 | memset (&cur_state, 0, sizeof (cur_state)); | 749 | memset (&cur_state, 0, sizeof (cur_state)); |