]> git.eshelyaron.com Git - emacs.git/commitdiff
(sound_perror): Save errno from being clobbered.
authorAndreas Schwab <schwab@suse.de>
Mon, 5 Nov 2001 14:09:32 +0000 (14:09 +0000)
committerAndreas Schwab <schwab@suse.de>
Mon, 5 Nov 2001 14:09:32 +0000 (14:09 +0000)
src/ChangeLog
src/sound.c

index ece278922f16e1990301442b93bff572f446153a..4b65a631218137948833b865300e92920a9713a2 100644 (file)
@@ -1,3 +1,7 @@
+2001-11-05  Andreas Schwab  <schwab@suse.de>
+
+       * sound.c (sound_perror): Save errno from being clobbered.
+
 2001-11-05  Dale Hagglund  <rdh@yottayotta.com>
 
        * unexelf.c (unexec): Don't use `mmap'.  Instead, read and write
index b3c075ba83131c66d385480a90f1998c810372de..d9fd55966a5014c4c70dafb6791d87cd17d04fa7 100644 (file)
@@ -262,12 +262,14 @@ static void
 sound_perror (msg)
      char *msg;
 {
+  int saved_errno = errno;
+
   turn_on_atimers (1);
 #ifdef SIGIO
   sigunblock (sigmask (SIGIO));
 #endif
-  if (errno != 0)
-    error ("%s: %s", msg, strerror (errno));
+  if (saved_errno != 0)
+    error ("%s: %s", msg, strerror (saved_errno));
   else
     error ("%s", msg);
 }