[libdvdnav-devel] [PATCH] libdvdread: drop perror()
Jean-Baptiste Kempf
jb at videolan.org
Thu Apr 17 15:35:02 CEST 2014
perror should give more information though...
Le 15/04/2014 21:27, Steve Dibb a écrit :
> perror() is only used twice in the code, everything else uses fprintf to
> stderr.
>
> diff --git a/src/dvd_input.c b/src/dvd_input.c
> index d7e2252..7cb3594 100644
> --- a/src/dvd_input.c
> +++ b/src/dvd_input.c
> @@ -172,7 +172,7 @@ static dvd_input_t file_open(const char *target)
> dev->fd = open(target, O_RDONLY | O_BINARY);
> #endif
> if(dev->fd < 0) {
> - perror("libdvdread: Could not open input");
> + fprintf(stderr, "libdvdread: Could not open input\n");
> free(dev);
> return NULL;
> }
> diff --git a/src/dvd_reader.c b/src/dvd_reader.c
> index 00a3398..63012d4 100644
> --- a/src/dvd_reader.c
> +++ b/src/dvd_reader.c
> @@ -390,7 +390,6 @@ dvd_reader_t *DVDOpen( const char *ppath )
>
> /* If we can't stat the file, give up */
> fprintf( stderr, "libdvdread: Can't stat %s\n", path );
> - perror("");
> goto DVDOpen_error;
> }
>
> _______________________________________________
> libdvdnav-devel mailing list
> libdvdnav-devel at videolan.org
> https://mailman.videolan.org/listinfo/libdvdnav-devel
>
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the libdvdnav-devel
mailing list