fade: Quiesce two gcc warnings.
[paraslash.git] / oss_write.c
index 090f990565ce10b7eb85bd8dde2c391c132797c4..70a58203db8a2f2e3eca5cfc12506334ed7133da 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009-2010 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2009-2011 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -88,7 +88,6 @@ static int oss_init(struct writer_node *wn, unsigned sample_rate,
        struct oss_write_args_info *conf = wn->conf;
        struct private_oss_write_data *powd = para_calloc(sizeof(*powd));
 
-       wn->private_data = powd;
        PARA_INFO_LOG("opening %s\n", conf->device_arg);
        ret = para_open(conf->device_arg, O_WRONLY, 0);
        if (ret < 0)
@@ -149,6 +148,7 @@ static int oss_init(struct writer_node *wn, unsigned sample_rate,
                        sample_rate);
        }
        wn->min_iqs = powd->bytes_per_frame;
+       wn->private_data = powd;
        return 1;
 err:
        close(powd->fd);