summaryrefslogtreecommitdiff
path: root/src/sound.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sound.c')
-rw-r--r--src/sound.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/sound.c b/src/sound.c
index 5ce185ea60e..27e06b8abab 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -437,10 +437,10 @@ find_sound_type (struct sound *s)
}
-/* Function installed by play-sound-internal with record_unwind_protect. */
+/* Function installed by play-sound-internal with record_unwind_protect_void. */
-static Lisp_Object
-sound_cleanup (Lisp_Object arg)
+static void
+sound_cleanup (void)
{
if (current_sound_device->close)
current_sound_device->close (current_sound_device);
@@ -448,8 +448,6 @@ sound_cleanup (Lisp_Object arg)
emacs_close (current_sound->fd);
xfree (current_sound_device);
xfree (current_sound);
-
- return Qnil;
}
/***********************************************************************
@@ -1346,13 +1344,13 @@ Internal use only, use `play-sound' instead. */)
GCPRO2 (sound, file);
current_sound_device = xzalloc (sizeof *current_sound_device);
current_sound = xzalloc (sizeof *current_sound);
- record_unwind_protect (sound_cleanup, Qnil);
+ record_unwind_protect_void (sound_cleanup);
current_sound->header = alloca (MAX_SOUND_HEADER_BYTES);
if (STRINGP (attrs[SOUND_FILE]))
{
/* Open the sound file. */
- current_sound->fd = openp (Fcons (Vdata_directory, Qnil),
+ current_sound->fd = openp (list1 (Vdata_directory),
attrs[SOUND_FILE], Qnil, &file, Qnil);
if (current_sound->fd < 0)
sound_perror ("Could not open sound file");