[libdvdnav-devel] [PATCH] libdvdread: drop perror()
Steve Dibb
beandog at gentoo.org
Tue Apr 15 21:27:44 CEST 2014
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;
}
More information about the libdvdnav-devel
mailing list