]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - osx_writer.c
osx_write: Kill superfluous NULL-pointer check.
[paraslash.git] / osx_writer.c
index b0d672c963443b7225ef2053871c3fb614b9df67..fab608597f8cc944a995ac52e45e607211828231 100644 (file)
 
 /** \file osx_writer.c paraslash's output plugin for MacOs */
 
+/*
+ * based on mosx-mpg123, by Guillaume Outters and Steven A. Kortze
+ * <skortze@sourceforge.net>
+ */
+
 #include <CoreAudio/CoreAudio.h>
 #include "para.h"
 #include "fd.h"
@@ -70,8 +75,7 @@ static void destroy_buffers(struct private_osx_writer_data *powd)
        powd->to->next = NULL;
        while (ptr) {
                ptr2 = ptr->next;
-               if (ptr->buffer)
-                       free(ptr->buffer);
+               free(ptr->buffer);
                free(ptr);
                ptr = ptr2;
        }
@@ -303,7 +307,7 @@ static int osx_write_post_select(__a_unused struct sched *s,
        wn->written = *wng->loaded;
        if (!powd->play) {
                if (AudioOutputUnitStart(powd->output))
-                       return -1;
+                       return -E_UNIT_START;
                powd->play = 1;
        }
        return 1;