[libbluray-devel] Fix NULL check

hpi1 git at videolan.org
Mon May 29 11:36:44 CEST 2017


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon May 29 12:35:04 2017 +0300| [4774f68322c449a5dc5dc110bda7a075ec46576d] | committer: hpi1

Fix NULL check

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

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

diff --git a/src/libbluray/disc/properties.c b/src/libbluray/disc/properties.c
index 659f9999..5ccdc054 100644
--- a/src/libbluray/disc/properties.c
+++ b/src/libbluray/disc/properties.c
@@ -84,7 +84,7 @@ static int _read_prop_file(const char *file, char **data)
     }
     file_unlink(file);
     *data = str_dup("");
-    return data ? 0 : -1;
+    return *data ? 0 : -1;
 }
 
 static int _write_prop_file(const char *file, const char *data)



More information about the libbluray-devel mailing list