diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/parse_ini.c | 6 | ||||
-rw-r--r-- | lib/utils_base.c | 4 | ||||
-rw-r--r-- | lib/utils_disk.c | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/lib/parse_ini.c b/lib/parse_ini.c index 57321753..c19952db 100644 --- a/lib/parse_ini.c +++ b/lib/parse_ini.c | |||
@@ -82,7 +82,7 @@ static void parse_locator(const char *locator, const char *def_stanza, np_ini_in | |||
82 | } else { | 82 | } else { |
83 | i->file=strdup(&(locator[stanza_len+1])); | 83 | i->file=strdup(&(locator[stanza_len+1])); |
84 | } | 84 | } |
85 | 85 | ||
86 | if(i->file==NULL || i->stanza==NULL){ | 86 | if(i->file==NULL || i->stanza==NULL){ |
87 | die(STATE_UNKNOWN, _("malloc() failed!\n")); | 87 | die(STATE_UNKNOWN, _("malloc() failed!\n")); |
88 | } | 88 | } |
@@ -110,7 +110,7 @@ np_arg_list* np_get_defaults(const char *locator, const char *default_section){ | |||
110 | if(inifile!=stdin) fclose(inifile); | 110 | if(inifile!=stdin) fclose(inifile); |
111 | } | 111 | } |
112 | free(i.stanza); | 112 | free(i.stanza); |
113 | return defaults; | 113 | return defaults; |
114 | } | 114 | } |
115 | 115 | ||
116 | /* read_defaults is where the meat of the parsing takes place. | 116 | /* read_defaults is where the meat of the parsing takes place. |
@@ -161,7 +161,7 @@ static int read_defaults(FILE *f, const char *stanza, np_arg_list **opts){ | |||
161 | default: | 161 | default: |
162 | switch(stanzastate){ | 162 | switch(stanzastate){ |
163 | /* we never found the start of the first stanza, so | 163 | /* we never found the start of the first stanza, so |
164 | * we're dealing with a config error | 164 | * we're dealing with a config error |
165 | */ | 165 | */ |
166 | case NOSTANZA: | 166 | case NOSTANZA: |
167 | die(STATE_UNKNOWN, _("Config file error")); | 167 | die(STATE_UNKNOWN, _("Config file error")); |
diff --git a/lib/utils_base.c b/lib/utils_base.c index d1453c67..68f45675 100644 --- a/lib/utils_base.c +++ b/lib/utils_base.c | |||
@@ -89,7 +89,7 @@ range | |||
89 | set_range_end(temp_range, end); | 89 | set_range_end(temp_range, end); |
90 | } | 90 | } |
91 | 91 | ||
92 | if (temp_range->start_infinity == TRUE || | 92 | if (temp_range->start_infinity == TRUE || |
93 | temp_range->end_infinity == TRUE || | 93 | temp_range->end_infinity == TRUE || |
94 | temp_range->start <= temp_range->end) { | 94 | temp_range->start <= temp_range->end) { |
95 | return temp_range; | 95 | return temp_range; |
@@ -164,7 +164,7 @@ check_range(double value, range *my_range) | |||
164 | { | 164 | { |
165 | int no = FALSE; | 165 | int no = FALSE; |
166 | int yes = TRUE; | 166 | int yes = TRUE; |
167 | 167 | ||
168 | if (my_range->alert_on == INSIDE) { | 168 | if (my_range->alert_on == INSIDE) { |
169 | no = TRUE; | 169 | no = TRUE; |
170 | yes = FALSE; | 170 | yes = FALSE; |
diff --git a/lib/utils_disk.c b/lib/utils_disk.c index 3ce4d47d..ba2b21d7 100644 --- a/lib/utils_disk.c +++ b/lib/utils_disk.c | |||
@@ -91,7 +91,7 @@ np_del_parameter(struct parameter_list *item, struct parameter_list *prev) | |||
91 | return next; | 91 | return next; |
92 | } | 92 | } |
93 | 93 | ||
94 | 94 | ||
95 | /* returns a pointer to the struct found in the list */ | 95 | /* returns a pointer to the struct found in the list */ |
96 | struct parameter_list * | 96 | struct parameter_list * |
97 | np_find_parameter(struct parameter_list *list, const char *name) | 97 | np_find_parameter(struct parameter_list *list, const char *name) |
@@ -101,7 +101,7 @@ np_find_parameter(struct parameter_list *list, const char *name) | |||
101 | if (! strcmp(temp_list->name, name)) | 101 | if (! strcmp(temp_list->name, name)) |
102 | return temp_list; | 102 | return temp_list; |
103 | } | 103 | } |
104 | 104 | ||
105 | return NULL; | 105 | return NULL; |
106 | } | 106 | } |
107 | 107 | ||
@@ -126,7 +126,7 @@ np_set_best_match(struct parameter_list *desired, struct mount_entry *mount_list | |||
126 | if (! best_match) { | 126 | if (! best_match) { |
127 | for (me = mount_list; me; me = me->me_next) { | 127 | for (me = mount_list; me; me = me->me_next) { |
128 | size_t len = strlen (me->me_mountdir); | 128 | size_t len = strlen (me->me_mountdir); |
129 | if ((exact == FALSE && (best_match_len <= len && len <= name_len && | 129 | if ((exact == FALSE && (best_match_len <= len && len <= name_len && |
130 | (len == 1 || strncmp (me->me_mountdir, d->name, len) == 0))) | 130 | (len == 1 || strncmp (me->me_mountdir, d->name, len) == 0))) |
131 | || (exact == TRUE && strcmp(me->me_mountdir, d->name)==0)) | 131 | || (exact == TRUE && strcmp(me->me_mountdir, d->name)==0)) |
132 | { | 132 | { |
@@ -175,7 +175,7 @@ np_seen_name(struct name_list *list, const char *name) | |||
175 | } | 175 | } |
176 | 176 | ||
177 | int | 177 | int |
178 | np_regex_match_mount_entry (struct mount_entry* me, regex_t* re) | 178 | np_regex_match_mount_entry (struct mount_entry* me, regex_t* re) |
179 | { | 179 | { |
180 | if (regexec(re, me->me_devname, (size_t) 0, NULL, 0) == 0 || | 180 | if (regexec(re, me->me_devname, (size_t) 0, NULL, 0) == 0 || |
181 | regexec(re, me->me_mountdir, (size_t) 0, NULL, 0) == 0 ) { | 181 | regexec(re, me->me_mountdir, (size_t) 0, NULL, 0) == 0 ) { |