[libdvdcss-devel] [PATCH 21/25] css: Drop disabled debug output from AttackPattern() / AttackPadding()

Diego Biurrun diego at biurrun.de
Tue Oct 21 21:02:02 CEST 2014


On Tue, Oct 21, 2014 at 06:09:09PM +0200, Jean-Baptiste Kempf wrote:
> On 20 Oct, Diego Biurrun wrote :
> > On Mon, Oct 20, 2014 at 07:13:50PM +0200, Jean-Baptiste Kempf wrote:
> > > Le 20/10/2014 11:59, Diego Biurrun a écrit :
> > > >---
> > > >  src/css.c | 18 ------------------
> > > >  1 file changed, 18 deletions(-)
> > > >
> > > >--- a/src/css.c
> > > >+++ b/src/css.c
> > > >@@ -1651,15 +1651,6 @@ static int AttackPattern( uint8_t const p_sec[ DVDCSS_BLOCK_SIZE ],
> > > >          i_success += ( res >= 0 );
> > > >-#if 0
> > > >-        if( res >= 0 )
> > > >-        {
> > > >-            fprintf( stderr, "key is %02x:%02x:%02x:%02x:%02x ",
> > > >-                     p_key[0], p_key[1], p_key[2], p_key[3], p_key[4] );
> > > >-            fprintf( stderr, "at block %5d pattern len %3d period %3d %s\n",
> > > >-                     i_pos, i_best_plen, i_best_p, (res>=0?"y":"n") );
> > > >-        }
> > > >-#endif
> > > >          return ( res >= 0 );
> > > >@@ -1734,15 +1725,6 @@ static int AttackPadding( uint8_t const p_sec[ DVDCSS_BLOCK_SIZE ],
> > > >
> > > >-    if( 1 )
> > > >-    {
> > > >-        /*fprintf( stderr, "key is %02x:%02x:%02x:%02x:%02x ",
> > > >-                   p_key[0], p_key[1], p_key[2], p_key[3], p_key[4] );*/
> > > >-        fprintf( stderr, "at block %5d padding len %4d "
> > > >-                 "type %02x sub %02x\n",  i_pos, i_pes_length,
> > > >-                 p_sec[0x11], p_sec[0x17 + p_sec[0x16]]);
> > > >-    }
> > > >-
> > > >      return 0;
> > > >  }
> > > 
> > > The second part was not disabled, was it?
> > 
> > Correct.  I'll update the log message to
> > 
> >   css: Drop (disabled) debug output from AttackPattern() / AttackPadding()
> > 
> > then.
> 
> But we need the if 1, frpintf, no?

What for?

Both of the code blocks are under '#if 0'.  The second hunk is part of
a function under '#if 0', so it's also disabled.

Note that both are now broken since you were so quick to push my patch
that removes those unused parameters.  The parameters were unused, except
for this debug output.  Now compilation is broken if you enable the disabled
blocks.

You know, I had the patches in a specific order for a reason.. :)

Diego


More information about the libdvdcss-devel mailing list