title: Creating an empty hash table
body: <p>I'm trying to create an empty hash table of structure:</p>
  
  <pre><code>struct htab
  {
     size_t capacity;
     size_t size;
     struct pair *data;
  };
  </code></pre>
  
  <p>The data is an array of linked-lists to struct pair values. These linked-lists contain sentinels (dummy value) as first element.</p>
  
  <pre><code>struct pair
  {
     uint32_t hkey;
     char *key;
     void *value;
     struct pair *next;
  };
  </code></pre>
  
  <p>So I wrote this to have a capacity of 4 and size of 0. How could I initialise all cells of the 'data' array to 0?</p>
  
  <pre><code>struct htab *htab_new()
  {
     struct htab *newtable = 
     malloc(sizeof(struct htab));
     if (newtable == NULL)
     {
         errx(1, "Not enough memory!");
     }
     newtable-&gt;capacity = 4;
     newtable-&gt;size = 0;
     newtable-&gt;data = calloc(// ??);
     return newtable;
  }
  </code></pre>
  
  <p>Also, how could I test if this actually works?</p>