I've tried to work out a simplifcation with all possible branches. What do you guys think? @oni-link and @elmart 

```c
  // small -> small (temparray -> smallarray)
  // big   -> small (array -> smallarray)
  // small -> big   (array -> mallocarray)
  // big   -> big   (array -> mallocarray)

  // if we're going small -> small, we need to make a temporary copy
  oldarray = (ht->ht_array == ht->ht_smallarray && newsize == HT_INIT_SIZE)
    ? memcpy(temparray, ht->ht_smallarray, sizeof(temparray))
    : ht->ht_array;

  // if newsize fits in the small array, copy thence
  newarray = (newsize == HT_INIT_SIZE)
    ? ht->ht_smallarray
    : xmalloc(newsize * sizeof(hashitem_T));
```