]> git.eshelyaron.com Git - emacs.git/commitdiff
* sound.c (Fplay_sound_internal): Remove cast to unsigned long.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Jun 2011 06:49:00 +0000 (23:49 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Jun 2011 06:49:00 +0000 (23:49 -0700)
It's more likely to cause problems (due to unsigned overflow)
than to cure them.

src/ChangeLog
src/sound.c

index 6562df06471058efe6d139b8cb7f78e04e186b6a..686c728f0a3cd3d60152ef482a5aee852bfd166c 100644 (file)
@@ -1,5 +1,9 @@
 2011-06-13  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
+       It's more likely to cause problems (due to unsigned overflow)
+       than to cure them.
+
        * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
 
        * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
index 794c8e64e54fdf80cad36e052af1070fc003a9a5..0e71e66352ec625dc744e824bb8b0d2cc182e8ef 100644 (file)
@@ -1447,7 +1447,7 @@ Internal use only, use `play-sound' instead.  */)
     }
   else if (FLOATP (attrs[SOUND_VOLUME]))
     {
-      ui_volume_tmp = (unsigned long) XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100;
+      ui_volume_tmp = XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100;
     }
   /*
     Based on some experiments I have conducted, a value of 100 or less