changeset 47:9db0de5db7c8 src

100l, initialize file descriptor to -1, not 0. Fixes libdvdread closing stdin if it can't open the file/device.
author reimar
date Sat, 30 Jan 2010 15:15:23 +0000
parents 4f40782ab5fc
children d71db8e4e1c7
files dvd_reader.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dvd_reader.c	Mon Dec 07 03:50:20 2009 +0000
+++ b/dvd_reader.c	Sat Jan 30 15:15:23 2010 +0000
@@ -335,7 +335,7 @@
 dvd_reader_t *DVDOpen( const char *ppath )
 {
   struct stat fileinfo;
-  int ret, have_css, retval, cdir = 0;
+  int ret, have_css, retval, cdir = -1;
   dvd_reader_t *ret_val = NULL;
   char *dev_name = NULL;
   char *path = NULL, *new_path = NULL, *path_copy = NULL;