From: Florian Forster Date: Sat, 10 Nov 2012 07:58:00 +0000 (+0100) Subject: collection3: Remove duplicate definition of contains_invalid_chars(). X-Git-Tag: collectd-5.1.1~2 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=642bde1ec7306e5dc0fed28fda72807f2d97a3fd;p=collectd.git collection3: Remove duplicate definition of contains_invalid_chars(). Thanks to Jonathan Amiez for pointing this out! Fixes Github issue #160. --- diff --git a/contrib/collection3/bin/index.cgi b/contrib/collection3/bin/index.cgi index a8502717..4723af96 100755 --- a/contrib/collection3/bin/index.cgi +++ b/contrib/collection3/bin/index.cgi @@ -262,28 +262,6 @@ sub contains_invalid_chars return; } -sub contains_invalid_chars -{ - my $str = shift; - - for (split (m//, $str)) - { - my $n = ord ($_); - - # Whitespace is allowed. - if (($n >= 9) && ($n <= 13)) - { - next; - } - elsif ($n < 32) - { - return (1); - } - } - - return; -} - sub show_selector { my $timespan_selection = get_timespan_selection ();