From: Florian Forster Date: Fri, 25 Sep 2009 10:10:10 +0000 (+0200) Subject: openvpn plugin: single_read: Remove one level of indentation. X-Git-Tag: collectd-4.9.0~37^2~6 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=aca8f06eb3019d334a4c50a5d838bb3e505f33ee;p=collectd.git openvpn plugin: single_read: Remove one level of indentation. --- diff --git a/src/openvpn.c b/src/openvpn.c index 33c94ed6..5a14e9e8 100644 --- a/src/openvpn.c +++ b/src/openvpn.c @@ -167,42 +167,40 @@ static int single_read (char *name, FILE *fh) { continue; } - else + + if (strcmp (fields[0], "TUN/TAP read bytes") == 0) { - if (strcmp (fields[0], "TUN/TAP read bytes") == 0) - { - /* read from the system and sent over the tunnel */ - tun_tx = atoll (fields[1]); - } - else if (strcmp (fields[0], "TUN/TAP write bytes") == 0) - { - /* read from the tunnel and written in the system */ - tun_rx = atoll (fields[1]); - } - else if (strcmp (fields[0], "TCP/UDP read bytes") == 0) - { - link_rx = atoll (fields[1]); - } - else if (strcmp (fields[0], "TCP/UDP write bytes") == 0) - { - link_tx = atoll (fields[1]); - } - else if (strcmp (fields[0], "pre-compress bytes") == 0) - { - pre_compress = atoll (fields[1]); - } - else if (strcmp (fields[0], "post-compress bytes") == 0) - { - post_compress = atoll (fields[1]); - } - else if (strcmp (fields[0], "pre-decompress bytes") == 0) - { - pre_decompress = atoll (fields[1]); - } - else if (strcmp (fields[0], "post-decompress bytes") == 0) - { - post_decompress = atoll (fields[1]); - } + /* read from the system and sent over the tunnel */ + tun_tx = atoll (fields[1]); + } + else if (strcmp (fields[0], "TUN/TAP write bytes") == 0) + { + /* read from the tunnel and written in the system */ + tun_rx = atoll (fields[1]); + } + else if (strcmp (fields[0], "TCP/UDP read bytes") == 0) + { + link_rx = atoll (fields[1]); + } + else if (strcmp (fields[0], "TCP/UDP write bytes") == 0) + { + link_tx = atoll (fields[1]); + } + else if (strcmp (fields[0], "pre-compress bytes") == 0) + { + pre_compress = atoll (fields[1]); + } + else if (strcmp (fields[0], "post-compress bytes") == 0) + { + post_compress = atoll (fields[1]); + } + else if (strcmp (fields[0], "pre-decompress bytes") == 0) + { + pre_decompress = atoll (fields[1]); + } + else if (strcmp (fields[0], "post-decompress bytes") == 0) + { + post_decompress = atoll (fields[1]); } }