]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(rm_1): Remove `static' attribute on local `status'.
authorJim Meyering <jim@meyering.net>
Fri, 6 Jan 2006 10:14:19 +0000 (10:14 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 6 Jan 2006 10:14:19 +0000 (10:14 +0000)
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.

src/remove.c

index 208f56997edb10d6a1323dcd46e43e3d151c2f5f..d146ea203ceecd5ded1404dac12859f3aa58f831 100644 (file)
@@ -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