Use spaces for indentation, not tabs.
[gnulib.git] / lib / fopen.c
index 72610bd..781ce2c 100644 (file)
@@ -68,35 +68,35 @@ rpl_fopen (const char *filename, const char *mode)
     size_t len = strlen (filename);
     if (len > 0 && filename[len - 1] == '/')
       {
-       int fd;
-       struct stat statbuf;
-       FILE *fp;
-
-       if (mode[0] == 'w' || mode[0] == 'a')
-         {
-           errno = EISDIR;
-           return NULL;
-         }
-
-       fd = open (filename, O_RDONLY);
-       if (fd < 0)
-         return NULL;
-
-       if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode))
-         {
-           close (fd);
-           errno = ENOTDIR;
-           return NULL;
-         }
-
-       fp = fdopen (fd, mode);
-       if (fp == NULL)
-         {
-           int saved_errno = errno;
-           close (fd);
-           errno = saved_errno;
-         }
-       return fp;
+        int fd;
+        struct stat statbuf;
+        FILE *fp;
+
+        if (mode[0] == 'w' || mode[0] == 'a')
+          {
+            errno = EISDIR;
+            return NULL;
+          }
+
+        fd = open (filename, O_RDONLY);
+        if (fd < 0)
+          return NULL;
+
+        if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode))
+          {
+            close (fd);
+            errno = ENOTDIR;
+            return NULL;
+          }
+
+        fp = fdopen (fd, mode);
+        if (fp == NULL)
+          {
+            int saved_errno = errno;
+            close (fd);
+            errno = saved_errno;
+          }
+        return fp;
       }
   }
 # endif