EPilkington/Derivative_calc — pull request #2 by mystor (2014-12-12 16:35:20+00:00)
Title: Switch from using malloc to calloc

In some places in the program, the ast nodes were not having their
left/right nodes set (as they were value nodes). However, as they were
malloced rather than calloced, the values of those left/right properties
were not always NULL, which broke copy_tree(struct Tree*) on some
computers.

This patch switches from using malloc to calloc, which avoids those
problems, at the cost of zeroing all data structures.

In the future, malloc could be used instead, but special effort should
be made to ensure that the ->left and ->right properties of nodes are
always set.