1
0

bintree_node_init.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*********************** -*- Mode: C -*- ***********************
  2. * File : bintree_node_init.c
  3. *---------------------------------------------------------------
  4. * Description
  5. * ===========
  6. * This operation is called to initialise a "clientnode" ready for
  7. * insertion into a tree. This is only required once after the memory
  8. * for a node has been allocated.
  9. *
  10. * tree - the tree instance to invoke this operation upon
  11. * clientnode - the node to initialise.
  12. *
  13. *---------------------------------------------------------------
  14. * Author : Graeme McKerrell
  15. * Created On : Wed Jan 28 09:57:06 2004
  16. * Status : TESTED
  17. *---------------------------------------------------------------
  18. * HISTORY
  19. * 7-Dec-2004 Graeme McKerrell
  20. * Renamed to the "lub_" namespace
  21. * 5-May-2004 Graeme McKerrell
  22. * updates following review
  23. * 27-Feb-2004 Graeme McKerrell
  24. * Updated to simplify the initialisation of nodes
  25. * 28-Jan-2004 Graeme McKerrell
  26. * Initial version
  27. *---------------------------------------------------------------
  28. * Copyright (C) 2004 3Com Corporation. All Rights Reserved.
  29. **************************************************************** */
  30. #include <assert.h>
  31. #include "private.h"
  32. /*--------------------------------------------------------- */
  33. void
  34. lub_bintree_node_init(lub_bintree_node_t *node)
  35. {
  36. assert(node);
  37. if(node)
  38. {
  39. node->left = NULL;
  40. node->right = NULL;
  41. }
  42. }
  43. /*--------------------------------------------------------- */