diff mbox series

[02/23] audio: fix bit-rotted code

Message ID 20210110100239.27588-2-vr_qemu@t-online.de (mailing list archive)
State New, archived
Headers show
Series next round of audio patches | expand

Commit Message

Volker Rümelin Jan. 10, 2021, 10:02 a.m. UTC
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
---
 audio/alsaaudio.c | 2 +-
 audio/sdlaudio.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Gerd Hoffmann Jan. 14, 2021, 2:32 p.m. UTC | #1
Hi,

>  #ifdef DEBUG
> -    alsa_dump_info(req, obt, obtfmt, pdo);
> +    alsa_dump_info(req, obt, obtfmt, apdo);
>  #endif

"if (DEBUG) { .... }" is a nice way to have this checked by the
compiler.  With "#define DEBUG 0" the compiler will optimize away
the dead code, so it isn't much different to #ifdef'ed code.

take care,
  Gerd
Volker Rümelin Jan. 31, 2021, 5:13 p.m. UTC | #2
>>   #ifdef DEBUG
>> -    alsa_dump_info(req, obt, obtfmt, pdo);
>> +    alsa_dump_info(req, obt, obtfmt, apdo);
>>   #endif
> "if (DEBUG) { .... }" is a nice way to have this checked by the
> compiler.  With "#define DEBUG 0" the compiler will optimize away
> the dead code, so it isn't much different to #ifdef'ed code.

Hi,

I will amend this in my next patch series.

With best regards,
Volker

> take care,
>    Gerd
>
diff mbox series

Patch

diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c
index a8e62542f9..6787e91bc1 100644
--- a/audio/alsaaudio.c
+++ b/audio/alsaaudio.c
@@ -599,7 +599,7 @@  static int alsa_open(bool in, struct alsa_params_req *req,
     }
 
 #ifdef DEBUG
-    alsa_dump_info(req, obt, obtfmt, pdo);
+    alsa_dump_info(req, obt, obtfmt, apdo);
 #endif
     return 0;
 
diff --git a/audio/sdlaudio.c b/audio/sdlaudio.c
index bf3cfb8456..00cd12ba66 100644
--- a/audio/sdlaudio.c
+++ b/audio/sdlaudio.c
@@ -215,7 +215,7 @@  static void sdl_callback (void *opaque, Uint8 *buf, int len)
         return;
     }
 
-    /* dolog ("in callback samples=%zu live=%zu\n", samples, sdl->live); */
+    /* dolog("callback: len=%d avail=%zu\n", len, hw->pending_emul); */
 
     while (hw->pending_emul && len) {
         size_t write_len;