if(input == NULL) { crm_err("No file to read"); return NULL; }
file2xml(FILE *input){		char *buffer = NULL;	crm_data_t *new_obj = NULL;	int start = 0, length = 0, read_len = 0;		/* see how big the file is */	start  = ftell(input);	fseek(input, 0L, SEEK_END);	length = ftell(input);	fseek(input, 0L, start);		if(start != ftell(input)) {		crm_err("fseek not behaving");		return NULL;	}	crm_debug_3("Reading %d bytes from file", length);	crm_malloc0(buffer, sizeof(char) * (length+1));	read_len = fread(buffer, sizeof(char), length, input);	if(read_len != length) {		crm_err("Calculated and read bytes differ: %d vs. %d",			length, read_len);	} else  if(length > 0) {		new_obj = string2xml(buffer);	} else {		crm_warn("File contained no XML");	}		crm_free(buffer);	return new_obj;}