[libdvdcss-devel] [PATCH 39/47] libdvdcss: Improve some comments in dvdcss_open()

Diego Biurrun <[email protected]>
Newsgroups gmane.comp.video.videolan.libdvdcss,gmane.comp.video.videolan.libdvdcss.devel
Message-ID <[email protected]>
---
 src/libdvdcss.c | 24 ++++++------------------
 1 file changed, 6 insertions(+), 18 deletions(-)

diff --git a/src/libdvdcss.c b/src/libdvdcss.c
index d886ad9..4e78da1 100644
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -290,20 +290,14 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
     const char *psz_raw_device = getenv( "DVDCSS_RAW_DEVICE" );
 #endif
 
-    dvdcss_t dvdcss;
-
-    /*
-     *  Allocate the library structure
-     */
-    dvdcss = malloc( sizeof( struct dvdcss_s ) );
+    /* Allocate the library structure */
+    dvdcss_t dvdcss = malloc( sizeof( struct dvdcss_s ) );
     if( dvdcss == NULL )
     {
         return NULL;
     }
 
-    /*
-     *  Initialize structure with default values
-     */
+    /* Initialize structure with default values */
 #ifdef DVDCSS_RAW_OPEN
     dvdcss->i_raw_fd = -1;
 #endif
@@ -313,14 +307,10 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
     dvdcss->i_method = DVDCSS_METHOD_KEY;
     dvdcss->psz_cachefile[0] = '\0';
 
-    /*
-     *  Find verbosity from DVDCSS_VERBOSE environment variable
-     */
+    /* Set library verbosity from DVDCSS_VERBOSE environment variable. */
     set_verbosity( dvdcss );
 
-    /*
-     *  Find method from DVDCSS_METHOD environment variable
-     */
+    /* Set DVD access method from DVDCSS_METHOD environment variable. */
     if( set_access_method( dvdcss ) < 0 )
     {
         goto error;
@@ -329,9 +319,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
     /* Set CSS key cache directory. */
     psz_cache = set_cache_directory( dvdcss );
 
-    /*
-     *  Open device
-     */
+    /* Open device */
     dvdcss_check_device( dvdcss );
     i_ret = dvdcss_open_device( dvdcss );
     if( i_ret < 0 )
-- 
1.9.1

_______________________________________________
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.