]> xenbits.xensource.com Git - qemu-upstream-4.6-testing.git/commitdiff
audio: replace fprintf(stderr, ...) with error_report() in audio
authorLe Tan <tamlokveer@gmail.com>
Fri, 9 May 2014 23:55:20 +0000 (07:55 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 26 May 2014 06:41:21 +0000 (10:41 +0400)
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>
audio/spiceaudio.c
audio/wavcapture.c

index fceee50adbc13297ff9a514ba08aef6a12d933ba..7b79bedca2eb8404fcca74bf5f874dd6d03d4d43 100644 (file)
@@ -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;
     }
index 9d94623225b286e6cd3f5f8fefe8b9cca34f2908..6f6d79269113499852bd9211b5671cd3fe50fd8e 100644 (file)
@@ -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));
         }
     }