From: Zdeněk Šustr Date: Thu, 9 Aug 2012 14:50:41 +0000 (+0000) Subject: Minor fixes X-Git-Tag: glite-lbjp-common-gss_R_3_2_4_1~15 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=d9724d6d95b5b2e35f432d9831eb05f40bb6b025;p=jra1mw.git Minor fixes --- diff --git a/org.glite.lb.common/src/query_rec.c b/org.glite.lb.common/src/query_rec.c index 799ed48..6cfb1c5 100644 --- a/org.glite.lb.common/src/query_rec.c +++ b/org.glite.lb.common/src/query_rec.c @@ -90,6 +90,7 @@ void edg_wll_QueryRecFree(edg_wll_QueryRec *prec) #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); diff --git a/org.glite.lb.server/src/bkserverd.c b/org.glite.lb.server/src/bkserverd.c index 0b93f74..28b0690 100644 --- a/org.glite.lb.server/src/bkserverd.c +++ b/org.glite.lb.server/src/bkserverd.c @@ -592,7 +592,7 @@ int main(int argc, char *argv[]) } 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); diff --git a/org.glite.lbjp-common.trio/src/escape.c b/org.glite.lbjp-common.trio/src/escape.c index 4e81b5b..61a76d9 100644 --- a/org.glite.lbjp-common.trio/src/escape.c +++ b/org.glite.lbjp-common.trio/src/escape.c @@ -318,7 +318,7 @@ char *glite_lbu_UnescapeURL(const char *in) { 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 '%'