Commit 878dc3b3 authored by fei4xu's avatar fei4xu Committed by Lev Walkin

Update asn1c-usage.tex

The encode function call will crash if it's not initialized. Update the document to make it more clear.
parent 46b394dd
......@@ -207,7 +207,7 @@ int main(int ac, char **av) {
asn_enc_rval_t ec; /* Encoder return value */
/* Allocate the Rectangle_t */
rectangle = calloc(1, sizeof(Rectangle_t)); /* not malloc! */
rectangle = calloc(1, sizeof(Rectangle_t)); /* must initialize to zero, not malloc! */
if(!rectangle) {
perror("calloc() failed");
exit(1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment