diff --git a/src/register.c b/src/register.c index e4014f5..f0fde4b 100644 --- a/src/register.c +++ b/src/register.c @@ -57,6 +57,7 @@ void register_init(void) { int sts, i; size_t len; char buff[128]; + char *c; memset(urlmap, 0, sizeof(urlmap)); @@ -73,7 +74,7 @@ void register_init(void) { } else { /* read the url table from file */ for (i=0;i < URLMAP_SIZE; i++) { - fgets(buff, sizeof(buff), stream); + c=fgets(buff, sizeof(buff), stream); sts=sscanf(buff, "***:%i:%i", &urlmap[i].active, &urlmap[i].expires); if (sts == 0) break; /* format error */ if (urlmap[i].active) { @@ -82,7 +83,7 @@ void register_init(void) { osip_uri_init(&urlmap[i].reg_url); #define R(X) {\ - fgets(buff, sizeof(buff), stream);\ + c=fgets(buff, sizeof(buff), stream);\ buff[sizeof(buff)-1]='\0';\ if (strchr(buff, 10)) *strchr(buff, 10)='\0';\ if (strchr(buff, 13)) *strchr(buff, 13)='\0';\ diff --git a/src/utils.c b/src/utils.c index c87704e..feb00f4 100644 --- a/src/utils.c +++ b/src/utils.c @@ -307,7 +307,7 @@ void secure_enviroment (void) { sts = chroot(configuration.chrootjail); if (sts != 0) DEBUGC(DBCLASS_CONFIG,"chroot(%s) failed: %s", configuration.chrootjail, strerror(errno)); - chdir("/"); + sts=chdir("/"); } /*