[libdvdnav-devel] [PATCH 22/33] Check for positive integer values

Andrew Clayton andrew at digital-domain.net
Sun Jan 18 02:11:26 CET 2015


On Thu, 15 Jan 2015 13:45:34 -0700, beandog at gentoo.org wrote:

> From: Steve Dibb <steve.dibb at gmail.com>
> 
> ---
>  src/ifo_read.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/ifo_read.c b/src/ifo_read.c
> index 38edbb9..5286340 100644
> --- a/src/ifo_read.c
> +++ b/src/ifo_read.c
> @@ -828,7 +828,7 @@ static int ifoRead_PGC_COMMAND_TBL(ifo_handle_t
> *ifofile, 
>    CHECK_VALUE(cmd_tbl->nr_of_pre + cmd_tbl->nr_of_post +
> cmd_tbl->nr_of_cell<= 255); 
> -  if(cmd_tbl->nr_of_pre != 0) {
> +  if(cmd_tbl->nr_of_pre > 0) {

Hmm, would simply

	if(cmd_tbl->nr_of_pre)

not perhaps be better?, it at least has the same meaning as the old
code and for me is quicker to read.

Cheers,
Andrew


More information about the libdvdnav-devel mailing list