From: Jay Freeman (saurik) Date: Sun, 13 Jul 2008 11:41:31 +0000 (+0000) Subject: OMG I AM STUPID X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/84af45a1631a4faca80416d6d22fa2023d4c59a0?ds=sidebyside OMG I AM STUPID --- diff --git a/Cydia.mm b/Cydia.mm index 975c184f..27113ffc 100644 --- a/Cydia.mm +++ b/Cydia.mm @@ -5445,14 +5445,10 @@ int main(int argc, char *argv[]) { setuid(0); setgid(0); - int error; - - error = unlink("/var/cache/apt/pkgcache.bin"); - if (error != 0) - _assert(error == ENOENT); - error = unlink("/var/cache/apt/srcpkgcache.bin"); - if (error != 0) - _assert(error == ENOENT); + if (unlink("/var/cache/apt/pkgcache.bin") == -1) + _assert(errno == ENOENT); + if (unlink("/var/cache/apt/srcpkgcache.bin") == -1) + _assert(errno == ENOENT); /*Method alloc = class_getClassMethod([NSObject class], @selector(alloc)); alloc_ = alloc->method_imp;