Misc coding style cleanup
Use a[b] instead of *(a+b), fix whitespace. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
816b79dd06
commit
432cbbec19
|
@ -145,8 +145,8 @@ MakeAtom(const char *string, unsigned len, Bool makeit)
|
||||||
*np = nd;
|
*np = nd;
|
||||||
nd->left = nd->right = NULL;
|
nd->left = nd->right = NULL;
|
||||||
nd->fingerPrint = fp;
|
nd->fingerPrint = fp;
|
||||||
nd->a = (++lastAtom);
|
nd->a = ++lastAtom;
|
||||||
*(nodeTable+lastAtom) = nd;
|
nodeTable[lastAtom] = nd;
|
||||||
return nd->a;
|
return nd->a;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -194,7 +194,7 @@ FreeAtom(NodePtr patom)
|
||||||
void
|
void
|
||||||
FreeAllAtoms(void)
|
FreeAllAtoms(void)
|
||||||
{
|
{
|
||||||
if(atomRoot == NULL)
|
if (atomRoot == NULL)
|
||||||
return;
|
return;
|
||||||
FreeAtom(atomRoot);
|
FreeAtom(atomRoot);
|
||||||
atomRoot = NULL;
|
atomRoot = NULL;
|
||||||
|
@ -208,7 +208,7 @@ InitAtoms(void)
|
||||||
{
|
{
|
||||||
FreeAllAtoms();
|
FreeAllAtoms();
|
||||||
tableLength = InitialTableSize;
|
tableLength = InitialTableSize;
|
||||||
nodeTable = malloc(InitialTableSize*sizeof(NodePtr));
|
nodeTable = malloc(InitialTableSize * sizeof(NodePtr));
|
||||||
if (!nodeTable)
|
if (!nodeTable)
|
||||||
AtomError();
|
AtomError();
|
||||||
nodeTable[None] = NULL;
|
nodeTable[None] = NULL;
|
||||||
|
|
Loading…
Reference in New Issue