From ca9cd1465905df283c56ac8e25b630aeba65273f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 14 Apr 2009 01:23:07 +0200 Subject: add a few missing initializations --- src/modules/udev-util.c | 4 ++-- src/tests/alsa-time-test.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/udev-util.c b/src/modules/udev-util.c index 8ffb76a8..144ad797 100644 --- a/src/modules/udev-util.c +++ b/src/modules/udev-util.c @@ -61,7 +61,7 @@ static int read_id(struct udev_device *d, const char *n) { int pa_udev_get_info(pa_core *core, pa_proplist *p, int card_idx) { int r = -1; struct udev *udev; - struct udev_device *card; + struct udev_device *card = NULL; char *t; const char *v; int id; @@ -89,7 +89,7 @@ int pa_udev_get_info(pa_core *core, pa_proplist *p, int card_idx) { pa_proplist_sets(p, PA_PROP_DEVICE_BUS, v); if (!pa_proplist_contains(p, PA_PROP_DEVICE_VENDOR_ID)) - if ((id = read_id(card, "ID_VENDOR_ID")) > 0 && *v) + if ((id = read_id(card, "ID_VENDOR_ID")) > 0) pa_proplist_setf(p, PA_PROP_DEVICE_VENDOR_ID, "%04x", id); if (!pa_proplist_contains(p, PA_PROP_DEVICE_VENDOR_NAME)) { diff --git a/src/tests/alsa-time-test.c b/src/tests/alsa-time-test.c index e852c3f7..233bbe64 100644 --- a/src/tests/alsa-time-test.c +++ b/src/tests/alsa-time-test.c @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) { int dir = 1; struct timespec start, last_timestamp = { 0, 0 }; uint64_t start_us; - snd_pcm_sframes_t last_avail, last_delay; + snd_pcm_sframes_t last_avail = 0, last_delay = 0; struct pollfd *pollfds; int n_pollfd; int64_t sample_count = 0; -- cgit v1.2.3