mirror of https://gerrit.osmocom.org/asn1c
Update asn1c-usage.tex
The encode function call will crash if it's not initialized. Update the document to make it more clear.master
parent
46b394dd3e
commit
878dc3b383
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue