]> git.sesse.net Git - vlc/commitdiff
Don't check return value of getopt_long against EOF, manpage says it returns -1...
authorJean-Paul Saman <jpsaman@videolan.org>
Sat, 10 Mar 2007 15:57:17 +0000 (15:57 +0000)
committerJean-Paul Saman <jpsaman@videolan.org>
Sat, 10 Mar 2007 15:57:17 +0000 (15:57 +0000)
src/misc/configuration.c

index 5d5679fb8772e8bc887e1545bb663873213c8583..2d8717abc34e4a5530505fd812d733d28a3c4b9d 100644 (file)
@@ -1486,7 +1486,7 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[],
     opterr = 0;
     optind = 1;
     while( ( i_cmd = getopt_long( *pi_argc, ppsz_argv, psz_shortopts,
-                                  p_longopts, &i_index ) ) != EOF )
+                                  p_longopts, &i_index ) ) != -1 )
     {
         /* A long option has been recognized */
         if( i_cmd == 0 )
@@ -1535,6 +1535,7 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[],
                                 "You should use --%s instead.\n",
                                 p_conf->psz_name, p_conf->psz_current);
                     }
+                    //*psz_name = *(p_conf->psz_current);
                     psz_name = p_conf->psz_current;
                     p_conf = config_FindConfig( p_this, psz_name );
                 }