...
Code Block | ||||
---|---|---|---|---|
| ||||
char *p = /* Initialize, may or may not be NULL */ if (p || (p = (char *) malloc(BUF_SIZE)) ) { /* Do stuff with p */ free(p); p = NULL; } else { /* Handle malloc() error */ return; } |
...
...
Code Block | ||||
---|---|---|---|---|
| ||||
char *p = /* Initialize, may or may not be NULL */ if (p || (p = (char *) malloc(BUF_SIZE)) ) { /* Do stuff with p */ free(p); p = NULL; } else { /* Handle malloc() error */ return; } |
...