From 65b32dc31d70705211bbc17f94770c77ce39a973 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Wed, 30 Jan 2013 23:54:08 -0800 Subject: [PATCH] Fix an uninitialized return value in sceIoCancel. --- Core/HLE/sceIo.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp index a57ac1a8d..15c535cf4 100644 --- a/Core/HLE/sceIo.cpp +++ b/Core/HLE/sceIo.cpp @@ -432,15 +432,14 @@ u32 sceIoCancel(int id) ERROR_LOG(HLE, "UNIMPL sceIoCancel(%d)", id); u32 error; FileNode *f = kernelObjects.Get < FileNode > (id, error); - int result; - if (f) + if (f) { f->closePending = true; - else { + } else { ERROR_LOG(HLE, "sceIoCancel: unknown id %d", id); - result = ERROR_KERNEL_BAD_FILE_DESCRIPTOR; + error = ERROR_KERNEL_BAD_FILE_DESCRIPTOR; } - return result; + return error; } s64 sceIoLseek(int id, s64 offset, int whence) {