I have this C code :
我有这个C代码:
#include<stdio.h>
typedef struct {
int foo;
} MyStruct;
MyStruct init_mystruct(void);
int main(void) {
MyStruct mystruct = init_mystruct();
if( mystruct == NULL ) {
/* error handler */
}
return(0);
}
MyStruct init_mystruct(void) {
MyStruct mystruct;
int is_ok = 1;
/*
* do something ...
*/
/* everything is OK */
if( is_ok )
return mystruct;
/* something went wrong */
else
return NULL;
}
#include<stdi