Re: [libdvdcss-devel] [PATCH 3/4] libdvdcss: Simplify cache directory name creation.

Jean-Baptiste Kempf <[email protected]>
Newsgroups gmane.comp.video.videolan.libdvdcss,gmane.comp.video.videolan.libdvdcss.devel
Message-ID <[email protected]>
lol. LGTM.

On 01 Nov, Diego Biurrun wrote :
> ---
>  src/libdvdcss.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/src/libdvdcss.c b/src/libdvdcss.c
> index 31df8d7..c6ef8be 100644
> --- a/src/libdvdcss.c
> +++ b/src/libdvdcss.c
> @@ -478,12 +478,11 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
>           * date and serial number, but different keys. */
>          if( dvdcss->b_scrambled )
>          {
> -             psz_key[0] = '-';
>               for( i = 0; i < KEY_SIZE; i++ )
>               {
> -                 sprintf( &psz_key[1+i*2], "%.2x", dvdcss->css.p_disc_key[i] );
> +                 sprintf( &psz_key[i * 2], "%.2x", dvdcss->css.p_disc_key[i] );
>               }
> -             psz_key[1 + KEY_SIZE * 2] = '\0';
> +             psz_key[KEY_SIZE * 2] = '\0';
>          }
>          else
>          {
> @@ -491,7 +490,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
>          }
>  
>          /* We have a disc name or ID, we can create the cache subdirectory. */
> -        i = sprintf( dvdcss->psz_cachefile, "%s/%s-%s%s",
> +        i = sprintf( dvdcss->psz_cachefile, "%s/%s-%s-%s",
>                       psz_cache, psz_title, psz_serial, psz_key );
>          i_ret = mkdir( dvdcss->psz_cachefile, 0755 );
>          if( i_ret < 0 && errno != EEXIST )
> -- 
> 1.9.1
> 
> _______________________________________________
> libdvdcss-devel mailing list
> [email protected]
> https://mailman.videolan.org/listinfo/libdvdcss-devel

-- 
With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
_______________________________________________
libdvdcss-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libdvdcss-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.