From ef915b14729ed1e160fdac6f1f305dfbdcaf47ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Wed, 30 Dec 2015 18:52:07 +0000 Subject: [PATCH] [USETUP]: Formatting fix & remove a redundant function. svn path=/trunk/; revision=70468 --- reactos/base/setup/usetup/inicache.c | 46 ++-------------------------- 1 file changed, 2 insertions(+), 44 deletions(-) diff --git a/reactos/base/setup/usetup/inicache.c b/reactos/base/setup/usetup/inicache.c index 1b63bbce138..c2f7f99b47f 100644 --- a/reactos/base/setup/usetup/inicache.c +++ b/reactos/base/setup/usetup/inicache.c @@ -42,9 +42,7 @@ IniCacheFreeKey( PINICACHEKEY Next; if (Key == NULL) - { return NULL; - } Next = Key->Next; if (Key->Name != NULL) @@ -73,9 +71,7 @@ IniCacheFreeSection( PINICACHESECTION Next; if (Section == NULL) - { return NULL; - } Next = Section->Next; while (Section->FirstKey != NULL) @@ -209,42 +205,6 @@ IniCacheAddKey( } -#if 0 -static -PINICACHESECTION -IniCacheFindSection( - PINICACHE Cache, - PWCHAR Name, - ULONG NameLength) -{ - PINICACHESECTION Section = NULL; - - if (Cache == NULL || Name == NULL || NameLength == 0) - { - return NULL; - } - - Section = Cache->FirstSection; - - /* iterate through list of sections */ - while (Section != NULL) - { - if (NameLength == wcslen(Section->Name)) - { - /* are the contents the same too? */ - if (_wcsnicmp(Section->Name, Name, NameLength) == 0) - break; - } - - /* get the next section*/ - Section = Section->Next; - } - - return Section; -} -#endif - - static PINICACHESECTION IniCacheAddSection( @@ -351,7 +311,7 @@ IniCacheGetSectionName( *NamePtr = NULL; *NameSize = 0; - /* skip whitespace */ + /* Skip whitespace */ while (*Ptr != 0 && isspace(*Ptr)) { Ptr++; @@ -401,7 +361,7 @@ IniCacheGetKeyName( *NameSize = 0; Size = 0; - /* skip whitespace and empty lines */ + /* Skip whitespace and empty lines */ while (isspace(*Ptr) || *Ptr == '\n' || *Ptr == '\r') { Ptr++; @@ -703,9 +663,7 @@ IniCacheDestroy( PINICACHE Cache) { if (Cache == NULL) - { return; - } while (Cache->FirstSection != NULL) {