[libdvdnav-devel] [PATCH] Add const

Lawrence D'Oliveiro ldo at geek-central.gen.nz
Wed Sep 9 10:00:37 CEST 2015


On Wed,  9 Sep 2015 10:10:26 +0300, Petri Hintukainen wrote:

> -  char *nokeys_str = getenv("DVDREAD_NOKEYS");
> +  const char *nokeys_str = getenv("DVDREAD_NOKEYS");
>    if(nokeys_str != NULL)
>      return 0;

Given that the variable is not actually used anywhere else, how about

    if(getenv("DVDREAD_NOKEYS") != NULL)
      return 0;

> -static dvd_file_t *DVDOpenFileUDF( dvd_reader_t *dvd, char *filename,
> +static dvd_file_t *DVDOpenFileUDF( dvd_reader_t *dvd, const char
> *filename, int do_cache )
[etc]

Yes, this kind of thing makes sense.


More information about the libdvdnav-devel mailing list