title: returning wrong address from pop function
body: <p>After solving other issues with my struct, my push works as intended however my pop returns the wrong address and I'm not sure why - </p>
  
  <pre><code>QNode* const Q_Pop(Q* const pointerQ){
  
     ...       // empty check
  
     QNode* tempNode = pointerQ-&gt;front.next;
  
     pointerQ-&gt;front.next = (tempNode-&gt;next);
     tempNode-&gt;next-&gt;prev = &amp;(pointerQ-&gt;front);
  
     return tempNode;
  }
  </code></pre>
  
  <p>I'm fairly certain my logic for the actual removal and relinking of the stack is correct but my use of pointers and returning them is messed up.</p>
  
  <p>struct - </p>
  
  <pre><code>struct QueueNode {
  
     struct QueueNode *prev;     /* Previous list element. */
     struct QueueNode *next;     /* Next list element.    */
  };
  
  typedef struct QueueNode QNode;
  
  struct Queue {
     QNode front;    // sentinel node at the front of the queue
     QNode rear;     // sentinel node at the tail of the queue
  };
  
  typedef struct Queue Q;
  </code></pre>
  
  <p>Thanks for the help!</p>