1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <headers.h>
#include <datatypes.h>
#include <options.h>
#include <leases.h>
#include <lock.h>

int check_leased_list()
{
  DHCPLIST *temp, *ntemp;<--- Unused variable: temp<--- Unused variable: ntemp
  int count = 1, i;<--- Unused variable: i

  /*  fprintf( stdout, "checking list! \n" ); */

  return 0;
}

static int test_and_set()
{
  /* Test lock, if it's locked return FALSE */

  return TRUE;
}

int lock_list()
{
  int count = 1;

  while( !test_and_set() )
    {
      sleep( 1 );
      count++;
    }

  return count;
}

int unlock_list()
{
  return TRUE;
}