Re: libdvdread: Patch OK?
Svante Signell, le Mon 05 Sep 2011 15:32:10 +0200, a écrit :
> Attached is a modified version of your patch also taking Samuels
> comments into account. Probably still not completely OK?
Almost.
> -static int findDirFile( const char *path, const char *file, char *filename )
> +static int findDirFile( const char *path, const char *file, char **filename )
> -static int findDVDFile( dvd_reader_t *dvd, const char *file, char *filename )
> +static int findDVDFile( dvd_reader_t *dvd, const char *file, char **filename )
> {
> - char video_path[ PATH_MAX + 1 ];
> + char *video_path = NULL;
> const char *nodirfile;
> int ret;
>
> @@ -659,19 +668,22 @@
> nodirfile = file;
> }
>
> - ret = findDirFile( dvd->path_root, nodirfile, filename );
> + ret = findDirFile( dvd->path_root, nodirfile, &filename );
Since here filename is already char **, you do not need an & to make
it a char **, simply pass filename, which is already a pointer to the
pointer to be updated.
Apart from that, it looks good.
Samuel
Reply to: