Skip to content

Commit

Permalink
audio: replace fprintf(stderr, ...) with error_report() in audio
Browse files Browse the repository at this point in the history
Replace fprintf(stderr,...) with error_report() in files audio/*.
The trailing "\n"s of the @fmt argument have been removed
because @fmt of error_report() should not contain newline.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
tamlok authored and Michael Tokarev committed May 26, 2014
1 parent d09b8fa commit 69e9950
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion audio/spiceaudio.c
Expand Up @@ -105,7 +105,7 @@ static int rate_get_samples (struct audio_pcm_info *info, SpiceRateCtl *rate)
bytes = muldiv64 (ticks, info->bytes_per_second, get_ticks_per_sec ());
samples = (bytes - rate->bytes_sent) >> info->shift;
if (samples < 0 || samples > 65536) {
fprintf (stderr, "Resetting rate control (%" PRId64 " samples)\n", samples);
error_report("Resetting rate control (%" PRId64 " samples)", samples);
rate_start (rate);
samples = 0;
}
Expand Down
3 changes: 1 addition & 2 deletions audio/wavcapture.c
Expand Up @@ -63,8 +63,7 @@ static void wav_destroy (void *opaque)
}
doclose:
if (fclose (wav->f)) {
fprintf (stderr, "wav_destroy: fclose failed: %s",
strerror (errno));
error_report("wav_destroy: fclose failed: %s", strerror(errno));
}
}

Expand Down

0 comments on commit 69e9950

Please sign in to comment.