Code

openvpn plugin: single_read: Remove one level of indentation.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Fri, 25 Sep 2009 10:10:10 +0000 (12:10 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 1 Dec 2009 10:35:43 +0000 (11:35 +0100)
src/openvpn.c

index 33c94ed62f90defc67c558c10696c6a378e2b04a..5a14e9e803c5aabaa1766d309ef2c263bfd24e28 100644 (file)
@@ -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]);
                }
        }