diff options
author | Jim Meyering <jim@meyering.net> | 2006-01-06 10:14:19 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-01-06 10:14:19 +0000 |
commit | 01ab0b79a1fa25557a625757ad37a0f5d74f28ad (patch) | |
tree | 553b40921afd8bea7798d5c3736e13e3c7a0db34 /src | |
parent | de0f11596dbdff2da73741dd8bfa6190ecd69456 (diff) | |
download | coreutils-01ab0b79a1fa25557a625757ad37a0f5d74f28ad.tar.xz |
(rm_1): Remove `static' attribute on local `status'.
First off, the attribute should have been `volatile' (not static)
to avoid longjmp-related risk of clobber. Secondly, now there is
no longer any risk of a local variable being clobbered, so there's
no need for any attribute at all.
Diffstat (limited to 'src')
-rw-r--r-- | src/remove.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/remove.c b/src/remove.c index 208f56997..d146ea203 100644 --- a/src/remove.c +++ b/src/remove.c @@ -1309,11 +1309,8 @@ rm_1 (Dirstack_state *ds, char const *filename, AD_push_initial (ds); AD_INIT_OTHER_MEMBERS (); - /* Put `status' in static storage, so it can't be clobbered - by the potential longjmp into this function. */ - static enum RM_status status; int fd_cwd = AT_FDCWD; - status = remove_entry (fd_cwd, ds, filename, x, NULL); + enum RM_status status = remove_entry (fd_cwd, ds, filename, x, NULL); if (status == RM_NONEMPTY_DIR) { /* In the event that remove_dir->remove_cwd_entries detects |