title: Updating members of a global struct
body: <p>Im trying to update a global linked list with a new node.  I made the list a pointer to a struct and each time I try to assign a new member value to it I get a bus error 10.  Im pretty hung up on this so any help would be greatly appreciated.</p>
  
  <p>The code:</p>
  
  <pre><code>typedef struct alarmItem
  {
      pthread_t id;  //id of the thread to block/unblock
      int delay;  //initial delay time set by user for this alarm item
      int realdelay;  //adjusted delay time for this item in the queue
      char function[256];  //function for this item to execute once alarm goes off
      char args[256];  //arguments to pass into function, sql query or null
      time_t calltime;  //stores the time that this alarm item was introduced
      struct alarmItem* next;  //stores the next node in the linked list of alarm    items
  } alarmItem ;
  
  typedef struct LinkedList
  {
      alarmItem* head;
  } LinkedList;
  
  LinkedList *alarmq;  //empty linkedlist of alarm items
  
  void initList()
  {
      if(alarmq == NULL)
          printf("List is null.\n\n");
      else
          alarmq-&gt;head = NULL;
  }
  
  void entry_point(char **arguments)
  {
      char **args = (char **)arguments;
  
      //create a new alarm item
      alarmItem *new;
  
      int d;
      sscanf(args[0], "%d", &amp;d);
      new-&gt;delay = d;
  
      strcpy(new-&gt;args, args[3]);
      strcpy(new-&gt;function, args[4]);
  
      initList();
  }
  </code></pre>
  
  <p>The entry_point function is just being called from the main method with a standard list of string commands. </p>