[USETUP]: Formatting fix & remove a redundant function.

svn path=/trunk/; revision=70468
This commit is contained in:
Hermès Bélusca-Maïto 2015-12-30 18:52:07 +00:00
parent c7272cefad
commit ef915b1472

View file

@ -42,9 +42,7 @@ IniCacheFreeKey(
PINICACHEKEY Next; PINICACHEKEY Next;
if (Key == NULL) if (Key == NULL)
{
return NULL; return NULL;
}
Next = Key->Next; Next = Key->Next;
if (Key->Name != NULL) if (Key->Name != NULL)
@ -73,9 +71,7 @@ IniCacheFreeSection(
PINICACHESECTION Next; PINICACHESECTION Next;
if (Section == NULL) if (Section == NULL)
{
return NULL; return NULL;
}
Next = Section->Next; Next = Section->Next;
while (Section->FirstKey != NULL) 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 static
PINICACHESECTION PINICACHESECTION
IniCacheAddSection( IniCacheAddSection(
@ -351,7 +311,7 @@ IniCacheGetSectionName(
*NamePtr = NULL; *NamePtr = NULL;
*NameSize = 0; *NameSize = 0;
/* skip whitespace */ /* Skip whitespace */
while (*Ptr != 0 && isspace(*Ptr)) while (*Ptr != 0 && isspace(*Ptr))
{ {
Ptr++; Ptr++;
@ -401,7 +361,7 @@ IniCacheGetKeyName(
*NameSize = 0; *NameSize = 0;
Size = 0; Size = 0;
/* skip whitespace and empty lines */ /* Skip whitespace and empty lines */
while (isspace(*Ptr) || *Ptr == '\n' || *Ptr == '\r') while (isspace(*Ptr) || *Ptr == '\n' || *Ptr == '\r')
{ {
Ptr++; Ptr++;
@ -703,9 +663,7 @@ IniCacheDestroy(
PINICACHE Cache) PINICACHE Cache)
{ {
if (Cache == NULL) if (Cache == NULL)
{
return; return;
}
while (Cache->FirstSection != NULL) while (Cache->FirstSection != NULL)
{ {