stream-restore: Preventative initialistion to NULL

There is not technically a bug here due to the early return and the knowledge that one of the if blocks
will definitely be run, but this makes sure we don't call free on uninitialised data or do
anything else suitibly daft. Also helps when you copy the code and change it slightly and don't realise
you've left things open...
This commit is contained in:
Colin Guthrie 2009-06-29 19:55:34 +01:00
parent 64979385e0
commit 42b30e1aa2

View file

@ -281,8 +281,8 @@ static pa_bool_t entries_equal(const struct entry *a, const struct entry *b) {
static void subscribe_callback(pa_core *c, pa_subscription_event_type_t t, uint32_t idx, void *userdata) { static void subscribe_callback(pa_core *c, pa_subscription_event_type_t t, uint32_t idx, void *userdata) {
struct userdata *u = userdata; struct userdata *u = userdata;
struct entry entry, *old; struct entry entry, *old = NULL;
char *name; char *name = NULL;
pa_datum key, data; pa_datum key, data;
pa_assert(c); pa_assert(c);