title: Double Pointer C for List
body: <p>A short time ago I began to learn c. When I tried coding list I wrote function with double pointer because I saw this in other resource, then I by myself finished writing this function and it's didn't work, please help me and explain how this work.</p>
  
  <pre><code>void
  push(v_stack_t ** node, int num_args, ...)
  {
  
      va_list ap;
      v_stack_t **current = node;
  
      va_start(ap, num_args);
      for (int i = 0; i &lt; num_args; i++) {
          v_stack_t *new_node = (v_stack_t *) malloc(sizeof(v_stack_t));
          new_node-&gt;value = va_arg(ap, int);
  
          if (*current == NULL) {
              *current = new_node;
              continue;
          }
          while ((*current)-&gt;next != NULL) {
              current = &amp;(*current)-&gt;next;
          }
          (*current)-&gt;next = new_node;
      }
      va_end(ap);
  }
  </code></pre>