From d9724d6d95b5b2e35f432d9831eb05f40bb6b025 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Thu, 9 Aug 2012 14:50:41 +0000 Subject: [PATCH] Minor fixes --- org.glite.lb.common/src/query_rec.c | 1 + org.glite.lb.server/src/bkserverd.c | 2 +- org.glite.lbjp-common.trio/src/escape.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) 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 '%' -- 1.8.2.3