From f2a13175e5a3a38d1340d2fff5e03f8c2e0d8f8e Mon Sep 17 00:00:00 2001 From: Perberos Date: Sun, 6 Nov 2011 19:14:03 -0300 Subject: aplicando formato allman --- src/eggshell.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'src/eggshell.c') diff --git a/src/eggshell.c b/src/eggshell.c index ff4d2ce..0a83d85 100644 --- a/src/eggshell.c +++ b/src/eggshell.c @@ -60,7 +60,8 @@ egg_shell (const char *shell) #ifndef G_OS_WIN32 struct passwd *pw; int i; - static const char shells [][14] = { + static const char shells [][14] = + { /* Note that on some systems shells can also * be installed in /usr/bin */ "/bin/bash", "/usr/bin/bash", @@ -71,23 +72,30 @@ egg_shell (const char *shell) }; if (geteuid () == getuid () && - getegid () == getgid ()) { + getegid () == getgid ()) + { /* only in non-setuid */ - if (shell != NULL) { - if (access (shell, X_OK) == 0) { + if (shell != NULL) + { + if (access (shell, X_OK) == 0) + { return g_strdup (shell); } } } pw = getpwuid(getuid()); - if (pw && pw->pw_shell) { - if (access (pw->pw_shell, X_OK) == 0) { + if (pw && pw->pw_shell) + { + if (access (pw->pw_shell, X_OK) == 0) + { return g_strdup (pw->pw_shell); } } - for (i = 0; i != G_N_ELEMENTS (shells); i++) { - if (access (shells [i], X_OK) == 0) { + for (i = 0; i != G_N_ELEMENTS (shells); i++) + { + if (access (shells [i], X_OK) == 0) + { return g_strdup (shells[i]); } } -- cgit v1.2.1