generate_key_expansion: make assumption explicit, use C99 features
This function potentially allocates memory, and can therefor not be run
again on an initialized key_ctx_bi. Make this explicit by adding an error
if someone tries do to this anyway.
While touching the function, cleanup it up a bit to make up for the added
lines of code.
Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <
1479845366-15774-1-git-send-email-steffan@karger.me>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13202.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>