summaryrefslogtreecommitdiff
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
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
-rw-r--r--gconfig.c9
-rw-r--r--radsecproxy.c2
-rw-r--r--util.c2
3 files changed, 6 insertions, 7 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;
diff --git a/radsecproxy.c b/radsecproxy.c
index 4aa52e3..ffabc0d 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -2632,7 +2632,7 @@ struct list *addsrvconfs(char *value, char **names) {
struct list *conflist;
int n;
struct list_node *entry;
- struct clsrvconf *conf;
+ struct clsrvconf *conf = NULL;
if (!names || !*names)
return NULL;
diff --git a/util.c b/util.c
index a9ccdde..d551cf0 100644
--- a/util.c
+++ b/util.c
@@ -100,7 +100,7 @@ char *addr2string(struct sockaddr *addr, socklen_t len) {
int connectport(int type, char *host, char *port) {
struct addrinfo hints, *res0, *res;
- int s;
+ int s = -1;
memset(&hints, 0, sizeof(hints));
hints.ai_socktype = type;