chase: reuse "done" to open fd of starting point
For readability that 'done' and 'fd' are always consistent with each other.
- dir_fd == AT_FDCWD:
- path is absolute:
- previous: fd = open("/")
- current: fd = openat(AT_FDCWD, "/")
- path is relative:
- previous: fd = openat(AT_FDCWD, ".")
- current: fd = openat(AT_FDCWD, ".")
- dir_fd >= 0:
- dir_fd points to "/":
- previous: fd = openat(dir_fd, ".")
- current: fd = openat(dir_fd, "/")
- dir_fd does not point to "/":
- previous: fd = openat(dir_fd, ".")
- current: fd = openat(dir_fd, ".")
Hence, this should not change any behavior. Just refactoring.