Creating Circular Buffer lib

Actually, I'm having a little trouble passing on arguments to an function called inside another one...

void queueAdd(queue *q, char *task) {
  if (queueDuplicateExists) return;
  if (queueIsFull) return;   
  else {
      int tail = (q->head + q->count) % q->size;
      q->tasks[tail] = *task;
      ++ q->count; } }

How can I correctly pass the queue to the test functions inside the queueAdd function?