diff --git a/src/dvdplayer.c b/src/dvdplayer.c index 4e2638e..2118773 100644 --- a/src/dvdplayer.c +++ b/src/dvdplayer.c @@ -54,9 +54,8 @@ static int readMCFile(int fd, void *buffer, int len) static int ReadFileFromMC(int port, int slot, const char *file, void *buffer, int len) { int fd, bytesRead; - int result; - if ((result = getStatMC(port, slot, NULL, NULL, NULL)) >= -2) { + if (getStatMC(port, slot, NULL, NULL, NULL) >= -2) { if ((fd = openMCFile(port, slot, file, 1)) >= 0) { if ((bytesRead = readMCFile(fd, buffer, len)) < 0) return -1; @@ -208,9 +207,7 @@ static int DVDPlayerUpdateCheck(int *pPort, int *pSlot, char *pVersion) static int DVDPlayerGetUpdateVersion(const char *file, int *pPort, int *pSlot) { - int result; - - if ((result = DVDPlayerUpdateCheck(pPort, pSlot, NULL)) == 0) { // DVD Player update of the right region exists and is newer. + if (DVDPlayerUpdateCheck(pPort, pSlot, NULL) == 0) { // DVD Player update of the right region exists and is newer. return (CheckFileFromMC(*pPort, *pSlot, file) == 0 ? 0 : -1); } diff --git a/src/libcdvd_add.c b/src/libcdvd_add.c index 9e38f02..a8e4327 100644 --- a/src/libcdvd_add.c +++ b/src/libcdvd_add.c @@ -11,14 +11,14 @@ static unsigned char MECHACON_CMD_S36_supported = 0, MECHACON_CMD_S27_supported // Initialize add-on functions. Currently only retrieves the MECHACON's version to determine what sceCdAltGetRegionParams() should do. int cdInitAdd(void) { - int result, i; + int i; u32 status; u8 MECHA_version_data[3]; unsigned int MECHA_version; // Like how CDVDMAN checks sceCdMV(), do not continuously attempt to get the MECHACON version because some consoles (e.g. DTL-H301xx) can't return one. for (i = 0; i <= 100; i++) { - if ((result = sceCdMV(MECHA_version_data, &status)) != 0 && ((status & 0x80) == 0)) { + if ((sceCdMV(MECHA_version_data, &status) != 0) && ((status & 0x80) == 0)) { MECHA_version = MECHA_version_data[2] | ((unsigned int)MECHA_version_data[1] << 8) | ((unsigned int)MECHA_version_data[0] << 16); MECHACON_CMD_S36_supported = (0x5FFFF < MECHA_version); // v6.0 and later MECHACON_CMD_S27_supported = (0x501FF < MECHA_version); // v5.2 and later @@ -26,9 +26,6 @@ int cdInitAdd(void) return 0; } } - - // printf("Failed to get MECHACON version: %d 0x%x\n", result, status); - return -1; } diff --git a/src/modelname.c b/src/modelname.c index 2e40834..a70cb89 100644 --- a/src/modelname.c +++ b/src/modelname.c @@ -17,7 +17,6 @@ extern char ConsoleROMVER[]; static int ReadModelName(char *name) { - int result; u32 stat; /* This function is a hybrid between the late ROM browser program and the HDD Browser. @@ -51,7 +50,7 @@ static int ReadModelName(char *name) return 0; // Original returned -1 } else { - if ((result = sceCdRM(name, &stat)) == 1) { // Command issued successfully. + if (sceCdRM(name, &stat) == 1) { // Command issued successfully. if (stat & 0x80) return -2; if ((stat & 0x40) || name[0] == '\0')