add a few missing initializations

This commit is contained in:
Lennart Poettering 2009-04-14 01:23:07 +02:00
parent 40d71e1f49
commit ca9cd14659
2 changed files with 3 additions and 3 deletions

View file

@ -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 pa_udev_get_info(pa_core *core, pa_proplist *p, int card_idx) {
int r = -1; int r = -1;
struct udev *udev; struct udev *udev;
struct udev_device *card; struct udev_device *card = NULL;
char *t; char *t;
const char *v; const char *v;
int id; 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); pa_proplist_sets(p, PA_PROP_DEVICE_BUS, v);
if (!pa_proplist_contains(p, PA_PROP_DEVICE_VENDOR_ID)) 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); pa_proplist_setf(p, PA_PROP_DEVICE_VENDOR_ID, "%04x", id);
if (!pa_proplist_contains(p, PA_PROP_DEVICE_VENDOR_NAME)) { if (!pa_proplist_contains(p, PA_PROP_DEVICE_VENDOR_NAME)) {

View file

@ -23,7 +23,7 @@ int main(int argc, char *argv[]) {
int dir = 1; int dir = 1;
struct timespec start, last_timestamp = { 0, 0 }; struct timespec start, last_timestamp = { 0, 0 };
uint64_t start_us; 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; struct pollfd *pollfds;
int n_pollfd; int n_pollfd;
int64_t sample_count = 0; int64_t sample_count = 0;