Make clearer that size = 0 in allocate_field() is not allowed.
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>
Mon, 2 Jun 2014 18:12:38 +0000 (21:12 +0300)
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>
Mon, 2 Jun 2014 18:12:38 +0000 (21:12 +0300)
commit99bc1d4f97710cc71612869d3d7e0f501a4626ff
treedf58f9ca664ed5713812f14a7b4fe52ca21f9324
parent8a857a7f7519414c2294cc9f3286ebe5dba5a6f3
Make clearer that size = 0 in allocate_field() is not allowed.

Back in design phase the code used realloc() for freeing the memory
also. However, this is not entirely portable, and therefore the finished
implementation used free() separately.

There were some remnants of the size = 0 code in the allocate_field()
code, which made it somewhat confusing. This change makes it clearer
that size = 0 is not allowed (and not used by nanopb).
pb_decode.c