test119.c 341 Bytes
Newer Older
1 2 3 4
typedef __crust_t__ unsigned char *crust_t;

#define NULL ((void *)0)

5 6
crust_t global1;
void function2(crust_t param);
7

8
void function(crust_t param) {
9

10 11 12 13 14
	if (global1 == NULL) {
		global1 = param; // It is fine: since we are storing the block from "param3" in a global variable, it is not a dangling pointer
	} else {
		function2(param);
	}
15
}