* src/remove.c (rm_1): Remove decl of local, fd_cwd.
Replace each of two uses with literal AT_FDCWD.
+ (cache_stat_init): Return its argument, for convenience.
+ Update the caller in remove_dir.
2006-11-25 Jim Meyering <jim@meyering.net>
return -1;
}
-/* Initialize a fstatat cache *ST. */
-static inline void
+/* Initialize a fstatat cache *ST. Return ST for convenience. */
+static inline struct stat *
cache_stat_init (struct stat *st)
{
st->st_size = -1;
+ return st;
}
/* Return true if *ST has been statted. */
But that's no big deal since we're interactive. */
struct stat empty_st;
Ternary is_empty;
- cache_stat_init (&empty_st);
- enum RM_status s = prompt (fd, ds, empty_dir, &empty_st, x,
+ enum RM_status s = prompt (fd, ds, empty_dir,
+ cache_stat_init (&empty_st), x,
PA_REMOVE_DIR, &is_empty);
if (s != RM_OK)
}
ds_clear (ds);
-
return status;
}