From: David Sommerseth <dav...@redhat.com>

The whole coding style was a mishmash of tab/spaces and different
alignments.

Reformatted to 2 space indents (no tabs).

Signed-off-by: David Sommerseth <dav...@redhat.com>
---
 src/openvpn/misc.c | 81 +++++++++++++++++++++++++++---------------------------
 1 file changed, 41 insertions(+), 40 deletions(-)

diff --git a/src/openvpn/misc.c b/src/openvpn/misc.c
index daf4900..d7cbb8c 100644
--- a/src/openvpn/misc.c
+++ b/src/openvpn/misc.c
@@ -354,48 +354,49 @@ openvpn_popen (const struct argv *a,  const struct 
env_set *es)
     {
 #if defined(ENABLE_FEATURE_EXECVE)
       if (script_security >= SSEC_BUILT_IN)
-       {
-             const char *cmd = a->argv[0];
-             char *const *argv = a->argv;
-             char *const *envp = (char *const *)make_env_array (es, true, &gc);
-             pid_t pid;
-             int pipe_stdout[2];
-
-              if (pipe (pipe_stdout) == 0) {
-                     pid = fork ();
-                     if (pid == (pid_t)0) /* child side */
-                       {
-                         close (pipe_stdout[0]);  /* Close read end */
-                         dup2 (pipe_stdout[1],1);
-                         execve (cmd, argv, envp);
-                         close (pipe_stdout[1]);
-                         exit (127);
-                       }
-                     else if (pid > (pid_t)0) /* parent side */
-                       {
-                          int status = 0;
-
-                          close (pipe_stdout[1]); /* Close write end */
-                          waitpid(pid, &status, 0);
-                          ret = pipe_stdout[0];
-                       }
-                     else /* fork failed */
-                       {
-                          close (pipe_stdout[0]);
-                          close (pipe_stdout[1]);
-                         msg (M_ERR, "openvpn_popen: unable to fork %s", cmd);
-                       }
-             }
-             else {
-                msg (M_WARN, "openvpn_popen: unable to create stdout pipe for 
%s", cmd);
-                ret = -1;
-             }
-       }
+        {
+          const char *cmd = a->argv[0];
+          char *const *argv = a->argv;
+          char *const *envp = (char *const *)make_env_array (es, true, &gc);
+          pid_t pid;
+          int pipe_stdout[2];
+
+          if (pipe (pipe_stdout) == 0) {
+            pid = fork ();
+            if (pid == (pid_t)0) /* child side */
+              {
+                close (pipe_stdout[0]);  /* Close read end */
+                dup2 (pipe_stdout[1],1);
+                execve (cmd, argv, envp);
+                close (pipe_stdout[1]);
+                exit (127);
+              }
+            else if (pid > (pid_t)0) /* parent side */
+              {
+                int status = 0;
+
+                close (pipe_stdout[1]); /* Close write end */
+                waitpid(pid, &status, 0);
+                ret = pipe_stdout[0];
+              }
+            else /* fork failed */
+              {
+                close (pipe_stdout[0]);
+                close (pipe_stdout[1]);
+                msg (M_ERR, "openvpn_popen: unable to fork %s", cmd);
+              }
+          }
+          else
+            {
+              msg (M_WARN, "openvpn_popen: unable to create stdout pipe for 
%s", cmd);
+              ret = -1;
+            }
+        }
       else if (!warn_shown && (script_security < SSEC_SCRIPTS))
-       {
-         msg (M_WARN, SCRIPT_SECURITY_WARNING);
+        {
+          msg (M_WARN, SCRIPT_SECURITY_WARNING);
           warn_shown = true;
-       }
+        }
 #else
       msg (M_WARN, "openvpn_popen: execve function not available");
 #endif
-- 
1.8.3.1


Reply via email to