# HG changeset patch # User nicodvb # Date 1199023705 0 # Node ID e9dd884a30548cb8b34a467709425dbcd66903b3 # Parent 584f645932b0b9bd76afb3bf2cdde811ff4ccbf1 functions returning pointers should return NULL, not 0. part of ogle-1764 diff -r 584f645932b0 -r e9dd884a3054 dvdread/ifo_read.c --- a/dvdread/ifo_read.c Sun Dec 30 13:59:19 2007 +0000 +++ b/dvdread/ifo_read.c Sun Dec 30 14:08:25 2007 +0000 @@ -99,7 +99,7 @@ ifofile = (ifo_handle_t *)malloc(sizeof(ifo_handle_t)); if(!ifofile) - return 0; + return NULL; memset(ifofile, 0, sizeof(ifo_handle_t)); @@ -113,7 +113,7 @@ fprintf(stderr, "libdvdread: Can't open file VIDEO_TS.IFO.\n"); } free(ifofile); - return 0; + return NULL; } /* First check if this is a VMGI file. */ @@ -123,7 +123,7 @@ if(!ifoRead_FP_PGC(ifofile) || !ifoRead_TT_SRPT(ifofile)) { fprintf(stderr, "libdvdread: Invalid main menu IFO (VIDEO_TS.IFO).\n"); ifoClose(ifofile); - return 0; + return NULL; } ifoRead_PGCI_UT(ifofile); @@ -133,7 +133,7 @@ if(!ifoRead_VTS_ATRT(ifofile)) { fprintf(stderr, "libdvdread: Invalid main menu IFO (VIDEO_TS.IFO).\n"); ifoClose(ifofile); - return 0; + return NULL; } ifoRead_TXTDT_MGI(ifofile); @@ -149,7 +149,7 @@ fprintf(stderr, "libdvdread: Invalid title IFO (VTS_%02d_0.IFO).\n", title); ifoClose(ifofile); - return 0; + return NULL; } @@ -162,7 +162,7 @@ fprintf(stderr, "libdvdread: Invalid title IFO (VTS_%02d_0.IFO).\n", title); ifoClose(ifofile); - return 0; + return NULL; } return ifofile; @@ -175,7 +175,7 @@ fprintf(stderr, "libdvdread: Invalid IFO for VMGM (VIDEO_TS.IFO).\n"); } ifoClose(ifofile); - return 0; + return NULL; } @@ -184,7 +184,7 @@ ifofile = (ifo_handle_t *)malloc(sizeof(ifo_handle_t)); if(!ifofile) - return 0; + return NULL; memset(ifofile, 0, sizeof(ifo_handle_t)); @@ -194,7 +194,7 @@ if(!ifofile->file) { fprintf(stderr, "libdvdread: Can't open file VIDEO_TS.IFO.\n"); free(ifofile); - return 0; + return NULL; } if(ifoRead_VMG(ifofile)) @@ -202,7 +202,7 @@ fprintf(stderr, "libdvdread: Invalid main menu IFO (VIDEO_TS.IFO).\n"); ifoClose(ifofile); - return 0; + return NULL; } @@ -211,14 +211,14 @@ ifofile = (ifo_handle_t *)malloc(sizeof(ifo_handle_t)); if(!ifofile) - return 0; + return NULL; memset(ifofile, 0, sizeof(ifo_handle_t)); if(title <= 0 || title > 99) { fprintf(stderr, "libdvdread: ifoOpenVTSI invalid title (%d).\n", title); free(ifofile); - return 0; + return NULL; } ifofile->file = DVDOpenFile(dvd, title, DVD_READ_INFO_FILE); @@ -227,7 +227,7 @@ if(!ifofile->file) { fprintf(stderr, "libdvdread: Can't open file VTS_%02d_0.IFO.\n", title); free(ifofile); - return 0; + return NULL; } ifoRead_VTS(ifofile); @@ -237,7 +237,7 @@ fprintf(stderr, "libdvdread: Invalid IFO for title %d (VTS_%02d_0.IFO).\n", title, title); ifoClose(ifofile); - return 0; + return NULL; }