#ifdef GLITE_LB_QUERY_REC_TEST
int main() {
+ // These assertions fail if the contents of edg_wll_QueryAttrNames[] are not synced with _edg_wll_QueryAttr
assert(sizeof(edg_wll_QueryAttrNames) / sizeof(edg_wll_QueryAttrNames[0]) == EDG_WLL_QUERY_ATTR__LAST);
assert(sizeof(edg_wll_QueryOpNames) / sizeof(edg_wll_QueryOpNames[0]) == EDG_WLL_QUERY_OP__LAST);
}
if (html_header) {
char *et, *ed;
- FILE *fp = fopen("file","r");
+ FILE *fp = fopen(html_header, "r");
if( fp ) {
fclose(fp);
glite_common_log(LOG_CATEGORY_CONTROL, LOG_PRIORITY_DEBUG, "Using HTML header file %s", html_header);
unsigned int val;
if(!in) return NULL;
- out = (char*)calloc(strlen(in), sizeof(char));
+ out = (char*)calloc(strlen(in)+1, sizeof(char));
strncpy(out, spec, strcspn(spec, "%")); // Copy the first part of the string up to the first '%'