[pulseaudio-commits] r1644 - /branches/lennart/src/modules/module-volume-restore.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Sat Aug 11 13:31:35 PDT 2007
Author: lennart
Date: Sat Aug 11 22:31:34 2007
New Revision: 1644
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1644&root=3Dpulseaudio&vi=
ew=3Drev
Log:
minor modernizations
Modified:
branches/lennart/src/modules/module-volume-restore.c
Modified: branches/lennart/src/modules/module-volume-restore.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/modules/mo=
dule-volume-restore.c?rev=3D1644&root=3Dpulseaudio&r1=3D1643&r2=3D1644&view=
=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/modules/module-volume-restore.c (original)
+++ branches/lennart/src/modules/module-volume-restore.c Sat Aug 11 22:31:3=
4 2007
@@ -26,7 +26,6 @@
#endif
=
#include <unistd.h>
-#include <assert.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
@@ -85,8 +84,8 @@
long k;
unsigned i;
=
- assert(s);
- assert(v);
+ pa_assert(s);
+ pa_assert(v);
=
if (!isdigit(*s))
return NULL;
@@ -170,7 +169,7 @@
continue;
}
=
- assert(ln =3D=3D buf_source);
+ pa_assert(ln =3D=3D buf_source);
=
if (buf_volume[0]) {
if (!parse_volume(buf_volume, &v)) {
@@ -297,8 +296,8 @@
struct rule *r;
char *name;
=
- assert(c);
- assert(u);
+ pa_assert(c);
+ pa_assert(u);
=
if (t !=3D (PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_NEW=
) &&
t !=3D (PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHA=
NGE) &&
@@ -313,7 +312,7 @@
if (!si->client || !(name =3D client_name(si->client)))
return;
} else {
- assert((t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) =3D=3D PA_SUBSCRI=
PTION_EVENT_SOURCE_OUTPUT);
+ pa_assert((t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) =3D=3D PA_SUBS=
CRIPTION_EVENT_SOURCE_OUTPUT);
=
if (!(so =3D pa_idxset_get_by_index(c->source_outputs, idx)))
return;
@@ -341,7 +340,7 @@
u->modified =3D 1;
}
} else {
- assert(so);
+ pa_assert(so);
=
if (!r->source || strcmp(so->source->name, r->source) !=3D 0) {
pa_log_info("Saving source for <%s>", r->name);
@@ -363,7 +362,7 @@
r->sink =3D pa_xstrdup(si->sink->name);
r->source =3D NULL;
} else {
- assert(so);
+ pa_assert(so);
r->volume_is_set =3D 0;
r->sink =3D NULL;
r->source =3D pa_xstrdup(so->source->name);
@@ -378,7 +377,7 @@
struct rule *r;
char *name;
=
- assert(data);
+ pa_assert(data);
=
if (!data->client || !(name =3D client_name(data->client)))
return PA_HOOK_OK;
@@ -405,7 +404,7 @@
struct rule *r;
char *name;
=
- assert(data);
+ pa_assert(data);
=
if (!data->client || !(name =3D client_name(data->client)))
return PA_HOOK_OK;
@@ -424,7 +423,7 @@
pa_modargs *ma =3D NULL;
struct userdata *u;
=
- assert(m);
+ pa_assert(m);
=
if (!(ma =3D pa_modargs_new(m->argument, valid_modargs))) {
pa_log("Failed to parse module arguments");
@@ -460,7 +459,7 @@
=
static void free_func(void *p, void *userdata) {
struct rule *r =3D p;
- assert(r);
+ pa_assert(r);
=
pa_xfree(r->name);
pa_xfree(r->sink);
@@ -471,7 +470,7 @@
void pa__done(pa_module*m) {
struct userdata* u;
=
- assert(m);
+ pa_assert(m);
=
if (!(u =3D m->userdata))
return;
More information about the pulseaudio-commits
mailing list