From 432cbbec194e47bf2a117c9302146e786c8a4ee1 Mon Sep 17 00:00:00 2001 From: Mikhail Gusarov Date: Thu, 13 May 2010 03:51:00 +0700 Subject: [PATCH] Misc coding style cleanup Use a[b] instead of *(a+b), fix whitespace. Signed-off-by: Mikhail Gusarov Reviewed-by: Keith Packard --- dix/atom.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dix/atom.c b/dix/atom.c index 7d04c6833..88b40db65 100644 --- a/dix/atom.c +++ b/dix/atom.c @@ -145,8 +145,8 @@ MakeAtom(const char *string, unsigned len, Bool makeit) *np = nd; nd->left = nd->right = NULL; nd->fingerPrint = fp; - nd->a = (++lastAtom); - *(nodeTable+lastAtom) = nd; + nd->a = ++lastAtom; + nodeTable[lastAtom] = nd; return nd->a; } else @@ -194,7 +194,7 @@ FreeAtom(NodePtr patom) void FreeAllAtoms(void) { - if(atomRoot == NULL) + if (atomRoot == NULL) return; FreeAtom(atomRoot); atomRoot = NULL; @@ -208,7 +208,7 @@ InitAtoms(void) { FreeAllAtoms(); tableLength = InitialTableSize; - nodeTable = malloc(InitialTableSize*sizeof(NodePtr)); + nodeTable = malloc(InitialTableSize * sizeof(NodePtr)); if (!nodeTable) AtomError(); nodeTable[None] = NULL;