]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hardlink: last_signal should be a volatile sig_atomic_t
authorCristian Rodríguez <crrodriguez@opensuse.org>
Sun, 15 Jan 2023 01:33:14 +0000 (01:33 +0000)
committerCristian Rodríguez <crrodriguez@opensuse.org>
Sun, 15 Jan 2023 01:33:14 +0000 (01:33 +0000)
misc-utils/hardlink.c

index 3a6b5df8ace578f067f65cdd63ba5734acd184e6..8cab5676852a8c44ce91757d946e503a794daea6 100644 (file)
@@ -218,7 +218,7 @@ static void *files_by_ino;
  * The last signal we received. We store the signal here in order to be able
  * to break out of loops gracefully and to return from our nftw() handler.
  */
-static int last_signal;
+static volatile sig_atomic_t last_signal;
 
 
 #define is_log_enabled(_level)  (quiet == 0 && (_level) <= (unsigned int)opts.verbosity)