Changeset 388


Ignore:
Timestamp:
Jul 22, 2010, 2:48:11 PM (15 years ago)
Author:
pr
Message:

Replace #define with variable.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-1-0/src/helpers/tree.c

    r222 r388  
    218218 +                         p,                   // new tree node
    219219 +                         fnCompare);          // comparison func
    220  +              return (p);
     220 +              return p;
    221221 +          }
    222222 *
     
    226226 +          int TREEENTRY fnCompare(ULONG ul1, ULONG ul2)
    227227 +          {
    228  +              return (strcmp((const char*)ul1,
    229  +                             (const char*)ul2));
     228 +              return strcmp((const char*)ul1,
     229 +                            (const char*)ul2);
    230230 +          }
    231231 *
     
    332332int TREEENTRY treeCompareStrings(unsigned long  ul1, unsigned long ul2)
    333333{
    334     #define p1 (const char*)(ul1)
    335     #define p2 (const char*)(ul2)
     334    const char *p1 = (const char*) ul1;
     335    const char *p2 = (const char*) ul2;
    336336
    337337    if (p1 && p2)
     
    760760        (*plCount)--;       // V0.9.16 (2001-10-19) [umoeller]
    761761
    762     return (STATUS_OK);
     762    return STATUS_OK;
    763763}
    764764
     
    999999    }
    10001000
    1001     return (papNodes);
     1001    return papNodes;
    10021002}
    10031003
  • trunk/src/helpers/tree.c

    r238 r388  
    332332int TREEENTRY treeCompareStrings(unsigned long  ul1, unsigned long ul2)
    333333{
    334     #define p1 (const char*)(ul1)
    335     #define p2 (const char*)(ul2)
     334    const char *p1 = (const char*) ul1;
     335    const char *p2 = (const char*) ul2;
    336336
    337337    if (p1 && p2)
Note: See TracChangeset for help on using the changeset viewer.