[libbluray-devel] bd_gpr_read(): "initialize" non-existing memory to 0

hpi1 git at videolan.org
Fri Nov 7 12:12:31 CET 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Nov  7 12:56:46 2014 +0200| [e2f7444d4b5ffd7ed929ae8fc6b60613c07a84bf] | committer: hpi1

bd_gpr_read(): "initialize" non-existing memory to 0

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=e2f7444d4b5ffd7ed929ae8fc6b60613c07a84bf
---

 src/libbluray/register.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libbluray/register.c b/src/libbluray/register.c
index cbe02ff..f6331ea 100644
--- a/src/libbluray/register.c
+++ b/src/libbluray/register.c
@@ -359,7 +359,7 @@ uint32_t bd_gpr_read(BD_REGISTERS *p, int reg)
 {
     if (reg < 0 || reg >= BD_GPR_COUNT) {
         BD_DEBUG(DBG_BLURAY, "bd_gpr_read(%d): invalid register\n", reg);
-        return -1;
+        return 0;
     }
 
     return p->gpr[reg];



More information about the libbluray-devel mailing list