title: Need to check if struct has been initialized
body: <p>Hi I am making a Queue abstact data type and I ran into a problem which I will try to explain as clearly as possible.
  Basically I have a two structs one for an element and one for a queue (so you can initialize multiple queues).</p>
  
  <pre><code>struct element
  {
      TYPE value;
      struct element* next;
  };
  
  struct queue
  {
      struct element* head;
      struct element* tail;
      int element_counter;
  };
  </code></pre>
  
  <p>And I have a function which initializes my queue struct.</p>
  
  <pre><code>int make_new_queue(struct queue* name)
  {
      name = malloc(sizeof(struct queue));
      name-&gt;head = NULL;
      name-&gt;tail = NULL;
      name-&gt;element_counter = 0;
  }
  </code></pre>
  
  <p>The problem I ran into is foolproofing this code. For example I initialised my first queue in my main function. </p>
  
  <pre><code>struct queue* first = make_new_queue(first);
  </code></pre>
  
  <p>But if somebody tries to do the same thing again somewhere in the middle of the code write:</p>
  
  <pre><code>first = make_new_queue(first);
  </code></pre>
  
  <p>it overrides it and makes the head and tail pointers NULL. The thing I can't figure out is how to make my make_new_queue function better and check if there is something in the queue that I provide it, but still let me initialise empty queues. </p>
  
  <p>Sorry for my english. I hope you get the idea of what I want to do. Thanks.</p>