Get rid of double allocation in parse_number()
commitd450de743630d7e59c0f1eca94aae30fb67ce116
authorPetr Tesarik <petr@tesarici.cz>
Tue, 16 Oct 2012 19:41:15 +0000 (16 21:41 +0200)
committerPetr Tesarik <petr@tesarici.cz>
Tue, 16 Oct 2012 19:41:15 +0000 (16 21:41 +0200)
tree98a0fb87e89513f31e098be3f6aef14a24a30558
parent3904ebf789e90f7df72f1691cad355916624ae04
Get rid of double allocation in parse_number()

While parsing a number, the bytestr is allocated first, then the atom
is allocated, the bytestr is copied to the atom, and then the bytestr
is freed.

Why do that if I can allocate the atom itself and get rid of the second
allocation and copying?
libhed/expr.c