R
Ram
Hi,
please find the following snippet code:
typedef struct {
int mode;
int uid;
int gid;
char prefix[MAX_NAME_LENGTH];
} config_objects;
config_objects *config_rules = NULL;
char temp_buf[1024];
const char delimiters[] = ":";
//temp_buff contains--> 00770:1000:2001:"cache"
token = strtok (temp_buf, delimiters);
config_rules->mode = atoi(token); --> segmentation fault??
Can any one please explain, why i am getting segfault here?
Thanks in advance!
-Ram
please find the following snippet code:
typedef struct {
int mode;
int uid;
int gid;
char prefix[MAX_NAME_LENGTH];
} config_objects;
config_objects *config_rules = NULL;
char temp_buf[1024];
const char delimiters[] = ":";
//temp_buff contains--> 00770:1000:2001:"cache"
token = strtok (temp_buf, delimiters);
config_rules->mode = atoi(token); --> segmentation fault??
Can any one please explain, why i am getting segfault here?
Thanks in advance!
-Ram