static void qpa_conn_fini(PAConnection *c);
-static void GCC_FMT_ATTR (2, 3) qpa_logerr (int err, const char *fmt, ...)
+static void G_GNUC_PRINTF (2, 3) qpa_logerr (int err, const char *fmt, ...)
{
va_list ap;
pa->stream = qpa_simple_new (
c,
- ppdo->has_stream_name ? ppdo->stream_name : g->dev->id,
+ ppdo->stream_name ?: g->dev->id,
PA_STREAM_PLAYBACK,
- ppdo->has_name ? ppdo->name : NULL,
+ ppdo->name,
&ss,
&ba, /* buffering attributes */
&error
pa->stream = qpa_simple_new (
c,
- ppdo->has_stream_name ? ppdo->stream_name : g->dev->id,
+ ppdo->stream_name ?: g->dev->id,
PA_STREAM_RECORD,
- ppdo->has_name ? ppdo->name : NULL,
+ ppdo->name,
&ss,
&ba, /* buffering attributes */
&error
/* common */
static void *qpa_conn_init(const char *server)
{
- PAConnection *c = g_malloc0(sizeof(PAConnection));
+ PAConnection *c = g_new0(PAConnection, 1);
QTAILQ_INSERT_TAIL(&pa_conns, c, list);
c->mainloop = pa_threaded_mainloop_new();
assert(dev->driver == AUDIODEV_DRIVER_PA);
- if (!popts->has_server) {
+ if (!popts->server) {
char pidfile[64];
char *runtime;
struct stat st;
return NULL;
}
- g = g_malloc0(sizeof(paaudio));
- server = popts->has_server ? popts->server : NULL;
+ g = g_new0(paaudio, 1);
+ server = popts->server;
g->dev = dev;