alsa-utils-1.0.18-fix_sysv_legacy.patch 774 B

1234567891011121314151617181920
  1. --- a/alsactl/init_parse.c 2009-01-15 10:44:48.000000000 +0000
  2. +++ b/alsactl/init_parse.c 2009-01-15 10:46:41.000000000 +0000
  3. @@ -381,7 +381,7 @@ static int set_ctl_value(struct space *s
  4. snd_ctl_elem_value_set_integer(space->ctl_value, idx, val);
  5. } else if (items > 2 && value[items-2] == 'd' && value[items-1] == 'B') {
  6. val = strtol(value, NULL, 0) * 100;
  7. - if ((pos2 = index(value, '.')) != NULL) {
  8. + if ((pos2 = strchr(value, '.')) != NULL) {
  9. if (isdigit(*(pos2-1)) && isdigit(*(pos2-2))) {
  10. if (val < 0)
  11. val -= strtol(pos2 + 1, NULL, 0);
  12. @@ -1253,7 +1253,7 @@ static char *new_root_dir(const char *fi
  13. res = strdup(filename);
  14. if (res) {
  15. - tmp = rindex(res, '/');
  16. + tmp = strrchr(res, '/');
  17. if (tmp)
  18. *tmp = '\0';
  19. }