summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/udev-util.c4
-rw-r--r--src/tests/alsa-time-test.c2
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;