summaryrefslogtreecommitdiff
path: root/gconfig.c
diff options
context:
space:
mode:
authorvenaas <venaas>2008-06-10 11:11:54 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2008-06-10 11:11:54 +0000
commitad526bb6c269419ccaa07289b578b53d86e88619 (patch)
treef41f523e314c434d820913b56dadd4bde1818cd1 /gconfig.c
parentbe653ec1827a47e129fd656312cffb109e87aad8 (diff)
removed some harmless compiler warnings
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/branches/release-1.1@289 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'gconfig.c')
-rw-r--r--gconfig.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gconfig.c b/gconfig.c
index 7a367e7..5efc97f 100644
--- a/gconfig.c
+++ b/gconfig.c
@@ -89,7 +89,7 @@ FILE *pushgconffile(struct gconffile **cf, const char *path) {
FILE *pushgconffiles(struct gconffile **cf, const char *cfgpath) {
int i;
- FILE *f;
+ FILE *f = NULL;
glob_t globbuf;
char *path, *curfile = NULL, *dir;
@@ -108,10 +108,9 @@ FILE *pushgconffiles(struct gconffile **cf, const char *cfgpath) {
strcpy(path + strlen(dir) + 1, cfgpath);
}
memset(&globbuf, 0, sizeof(glob_t));
- if (glob(path, 0, NULL, &globbuf)) {
+ if (glob(path, 0, NULL, &globbuf))
debug(DBG_INFO, "could not glob %s", path);
- f = NULL;
- } else {
+ else {
for (i = globbuf.gl_pathc - 1; i >= 0; i--) {
f = pushgconffile(cf, globbuf.gl_pathv[i]);
if (!f)
@@ -237,7 +236,7 @@ void getconfigline(struct gconffile **cf, char *block, char **opt, char **val, i
void getgenericconfig(struct gconffile **cf, char *block, ...) {
va_list ap;
char *opt = NULL, *val, *word, *optval, **str = NULL, ***mstr = NULL;
- uint8_t *bln;
+ uint8_t *bln = NULL;
int type = 0, conftype = 0, n;
void (*cbk)(struct gconffile **, char *, char *, char *) = NULL;