summaryrefslogtreecommitdiff
path: root/lib/getusershell.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2009-12-10 20:28:30 +0100
committerBruno Haible <bruno@clisp.org>2009-12-10 20:28:30 +0100
commit441aa3044f43e5572f58c354f01e6bc070acd5c7 (patch)
treebef236e8058dd3469da28ffcd5a6a287222a4c50 /lib/getusershell.c
parent039ae97b8ae35a2446c5d62d72b21689c97da7e2 (diff)
downloadgnulib-441aa3044f43e5572f58c354f01e6bc070acd5c7.tar.gz
Use spaces for indentation, not tabs.
Diffstat (limited to 'lib/getusershell.c')
-rw-r--r--lib/getusershell.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/getusershell.c b/lib/getusershell.c
index bea62a07af..ca2121d22a 100644
--- a/lib/getusershell.c
+++ b/lib/getusershell.c
@@ -83,8 +83,8 @@ getusershell (void)
if (default_index > 0)
{
if (default_shells[default_index])
- /* Not at the end of the list yet. */
- return xstrdup (default_shells[default_index++]);
+ /* Not at the end of the list yet. */
+ return xstrdup (default_shells[default_index++]);
return NULL;
}
@@ -92,19 +92,19 @@ getusershell (void)
{
shellstream = fopen (SHELLS_FILE, "r");
if (shellstream == NULL)
- {
- /* No shells file. Use the default list. */
- default_index = 1;
- return xstrdup (default_shells[0]);
- }
+ {
+ /* No shells file. Use the default list. */
+ default_index = 1;
+ return xstrdup (default_shells[0]);
+ }
}
while (readname (&line, &line_size, shellstream))
{
if (*line != '#')
- return line;
+ return line;
}
- return NULL; /* End of file. */
+ return NULL; /* End of file. */
}
/* Rewind the shells file. */
@@ -150,9 +150,9 @@ readname (char **name, size_t *size, FILE *stream)
for (;;)
{
if (*size <= name_index)
- *name = x2nrealloc (*name, size, sizeof **name);
+ *name = x2nrealloc (*name, size, sizeof **name);
if (c == EOF || isspace (c))
- break;
+ break;
(*name)[name_index++] = c;
c = getc (stream);
}