From d56930241ef6a17cf79f60621f0997b9024b6486 Mon Sep 17 00:00:00 2001 From: ericwa Date: Sun, 26 Sep 2010 19:39:39 +0000 Subject: [PATCH] Stylistic fixes --- properties.m | 4 ++-- runtime.c | 2 +- selector_table.c | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/properties.m b/properties.m index b13d051..1d067b8 100644 --- a/properties.m +++ b/properties.m @@ -149,7 +149,7 @@ objc_property_t* class_copyPropertyList(Class cls, unsigned int *outCount) { if (Nil == cls || !objc_test_class_flag(cls, objc_class_flag_new_abi)) { - if (outCount) { *outCount = 0; } + if (NULL != outCount) { *outCount = 0; } return NULL; } struct objc_property_list *properties = cls->properties; @@ -158,7 +158,7 @@ objc_property_t* class_copyPropertyList(Class cls, unsigned int *outCount) { count += l->count; } - if (outCount) + if (NULL != outCount) { *outCount = count; } diff --git a/runtime.c b/runtime.c index 8107782..cdbd054 100644 --- a/runtime.c +++ b/runtime.c @@ -158,7 +158,7 @@ class_copyIvarList(Class cls, unsigned int *outCount) unsigned int index; Ivar *list; - if (cls) + if (Nil != cls) { ivarlist = cls->ivars; } diff --git a/selector_table.c b/selector_table.c index 537b9dd..92255cb 100644 --- a/selector_table.c +++ b/selector_table.c @@ -349,7 +349,7 @@ static SEL objc_register_selector_copy(SEL aSel) const char *sel_getName(SEL sel) { - if ((SEL)NULL == sel) { return ""; } + if (NULL == sel) { return ""; } const char *name = sel->name; if (isSelRegistered(sel)) { @@ -395,21 +395,21 @@ BOOL sel_isEqual(SEL sel1, SEL sel2) SEL sel_registerName(const char *selName) { - if (NULL == selName) { return (SEL)NULL; } + if (NULL == selName) { return NULL; } struct objc_selector sel = {selName, 0}; return objc_register_selector_copy(&sel); } SEL sel_registerTypedName_np(const char *selName, const char *types) { - if (NULL == selName) { return (SEL)NULL; } + if (NULL == selName) { return NULL; } struct objc_selector sel = {selName, types}; return objc_register_selector_copy(&sel); } const char *sel_getType_np(SEL aSel) { - if ((SEL)NULL == aSel) { return NULL; } + if (NULL == aSel) { return NULL; } return aSel->types; } @@ -517,7 +517,7 @@ void objc_register_selector_array(SEL selectors, unsigned long count) SEL sel_get_typed_uid (const char *name, const char *types) { - if (NULL == name) { return (SEL)NULL; } + if (NULL == name) { return NULL; } SEL sel = selector_lookup(name, types); if (NULL == sel) { return sel_registerTypedName_np(name, types); } @@ -534,7 +534,7 @@ SEL sel_get_typed_uid (const char *name, const char *types) SEL sel_get_any_typed_uid (const char *name) { - if (NULL == name) { return (SEL)NULL; } + if (NULL == name) { return NULL; } SEL sel = selector_lookup(name, 0); if (NULL == sel) { return sel_registerName(name); }