tidying
[users/jgh/exim.git] / src / src / parse.c
index 7a072558afc08c8a39739417808f3bec5e8ecbe8..3d942fd95e2df08024748d33d0c491d3f42c4634 100644 (file)
@@ -1444,7 +1444,7 @@ for (;;)
       with a flag that fails symlinks. */
 
       {
-      int fd = open(directory, O_RDONLY);
+      int fd = open(CS directory, O_RDONLY);
       if (fd < 0)
        {
        *error = string_sprintf("failed to open directory %s", directory);
@@ -1460,15 +1460,16 @@ for (;;)
        temp = *p;
        *p = '\0';
 
-       if ((fd2 = openat(fd, q, O_RDONLY|O_NOFOLLOW)) < 0)
+       fd2 = openat(fd, CS q, O_RDONLY|O_NOFOLLOW);
+       close(fd);
+       *p = temp;
+       if (fd2 < 0)
          {
           *error = string_sprintf("failed to open %s (component of included "
             "file); could be symbolic link", filename);
          return FF_ERROR;
          }
-       close(fd);
        fd = fd2;
-       *p = temp;
        }
       f = fdopen(fd, "rb");
       }