[libdvdnav-devel] [PATCH 22/33] Check for positive integer values
beandog at gentoo.org
beandog at gentoo.org
Thu Jan 15 21:45:34 CET 2015
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) {
unsigned int pre_cmds_size = cmd_tbl->nr_of_pre * COMMAND_DATA_SIZE;
cmd_tbl->pre_cmds = malloc(pre_cmds_size);
if(!cmd_tbl->pre_cmds)
@@ -841,7 +841,7 @@ static int ifoRead_PGC_COMMAND_TBL(ifo_handle_t *ifofile,
}
}
- if(cmd_tbl->nr_of_post != 0) {
+ if(cmd_tbl->nr_of_post > 0) {
unsigned int post_cmds_size = cmd_tbl->nr_of_post * COMMAND_DATA_SIZE;
cmd_tbl->post_cmds = malloc(post_cmds_size);
if(!cmd_tbl->post_cmds) {
@@ -858,7 +858,7 @@ static int ifoRead_PGC_COMMAND_TBL(ifo_handle_t *ifofile,
}
}
- if(cmd_tbl->nr_of_cell != 0) {
+ if(cmd_tbl->nr_of_cell > 0) {
unsigned int cell_cmds_size = cmd_tbl->nr_of_cell * COMMAND_DATA_SIZE;
cmd_tbl->cell_cmds = malloc(cell_cmds_size);
if(!cmd_tbl->cell_cmds) {
--
2.0.4
More information about the libdvdnav-devel
mailing list