summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'config.c')
-rw-r--r--config.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/config.c b/config.c
index 7f08e52..18e2178 100644
--- a/config.c
+++ b/config.c
@@ -22,7 +22,6 @@
// Returns 1 for success or 0 for error/failure.
int getconfstr(char *confname, char *filename, char* dest) {
FILE *fp;
- char *ret;
char str[MAXCHAR];
int found = 0; // Have we found the configuration option?
@@ -57,7 +56,7 @@ int getconfstr(char *confname, char *filename, char* dest) {
// If the resulting temporary string contains the requested option name,
// we have found our configuration option and it is in the current 'str'
- if (!(ret = strstr(substr, confname)) == 0) {
+ if (strstr(substr, confname)) {
found = 1;
break;
}
@@ -71,7 +70,7 @@ int getconfstr(char *confname, char *filename, char* dest) {
return 0;
}
- long int pos;
+ long int pos = 0;
char conf[MAXCHAR]; // Temporary string to build configuration value in
// Starting from the end of the option name, find the position of the start of the configuration value