"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "alsactl/init_parse.c" between
alsa-utils-1.2.1.tar.bz2 and alsa-utils-1.2.2.tar.bz2

About: ALSA (Advanced Linux Sound Architecture) - Utilities.

init_parse.c  (alsa-utils-1.2.1.tar.bz2):init_parse.c  (alsa-utils-1.2.2.tar.bz2)
skipping to change at line 190 skipping to change at line 190
{ {
struct space *res; struct space *res;
char device[16]; char device[16];
int err; int err;
res = calloc(1, sizeof(struct space)); res = calloc(1, sizeof(struct space));
if (res == NULL) if (res == NULL)
return -ENOMEM; return -ENOMEM;
res->ctl_id_changed = ~0; res->ctl_id_changed = ~0;
res->linenum = -1; res->linenum = -1;
sprintf(device, "hw:%u", card); sprintf(device, "hw:%d", card);
err = snd_hctl_open(&res->ctl_handle, device, 0); err = snd_hctl_open(&res->ctl_handle, device, 0);
if (err < 0) if (err < 0)
goto error; goto error;
err = snd_hctl_load(res->ctl_handle); err = snd_hctl_load(res->ctl_handle);
if (err < 0) if (err < 0)
goto error; goto error;
err = snd_ctl_card_info_malloc(&res->ctl_card_info); err = snd_ctl_card_info_malloc(&res->ctl_card_info);
if (err < 0) if (err < 0)
goto error; goto error;
err = snd_ctl_card_info(snd_hctl_ctl(res->ctl_handle), res->ctl_card_info ); err = snd_ctl_card_info(snd_hctl_ctl(res->ctl_handle), res->ctl_card_info );
skipping to change at line 737 skipping to change at line 737
if (err < 0) if (err < 0)
return NULL; return NULL;
elem = snd_hctl_first_elem(space->ctl_handle); elem = snd_hctl_first_elem(space->ctl_handle);
while (elem) { while (elem) {
snd_hctl_elem_get_id(elem, id); snd_hctl_elem_get_id(elem, id);
if (ctl_match(space->ctl_id, id)) if (ctl_match(space->ctl_id, id))
index++; index++;
elem = snd_hctl_elem_next(elem); elem = snd_hctl_elem_next(elem);
} }
snd_ctl_elem_id_free(id); snd_ctl_elem_id_free(id);
sprintf(res, "%u", index); sprintf(res, "%d", index);
dbg("do_ctl_count found %s controls", res); dbg("do_ctl_count found %s controls", res);
return res; return res;
} }
Perror(space, "unknown ctl{} attribute '%s'", attr); Perror(space, "unknown ctl{} attribute '%s'", attr);
return NULL; return NULL;
value: value:
sprintf(res, "%lli", val); sprintf(res, "%lli", val);
return res; return res;
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)