diff --git a/src/ini_file_reader.c b/src/ini_file_reader.c index 54adc37..344c70f 100644 --- a/src/ini_file_reader.c +++ b/src/ini_file_reader.c @@ -1648,8 +1648,8 @@ static char *iniProccessFor(char *content, const int content_len, logWarning("file: "__FILE__", line: %d, " "invalid step: %d for range: %.*s, set step to 1", __LINE__, step, rangeLen, pForRange); - step = 1; - count = 0; + *offset = (pEnd + _PREPROCESS_TAG_LEN_ENDFOR) - content; + return content; } else { @@ -1659,7 +1659,8 @@ static char *iniProccessFor(char *content, const int content_len, logWarning("file: "__FILE__", line: %d, " "invalid step: %d for range: %.*s", __LINE__, step, rangeLen, pForRange); - count = 0; + *offset = (pEnd + _PREPROCESS_TAG_LEN_ENDFOR) - content; + return content; } } diff --git a/src/system_info.c b/src/system_info.c index 4e55336..33cea25 100644 --- a/src/system_info.c +++ b/src/system_info.c @@ -185,7 +185,8 @@ int get_boot_time(struct timeval *boot_time) snprintf(left.f_mntonname, sizeof(left.f_mntonname), "%s", mntonname); \ } while (0) -int get_mounted_filesystems(struct fast_statfs *stats, const int size, int *count) +int get_mounted_filesystems(struct fast_statfs *stats, + const int size, int *count) { #ifdef OS_LINUX const char *filename = "/proc/mounts"; diff --git a/src/system_info.h b/src/system_info.h index 4a4ce80..5b214c5 100644 --- a/src/system_info.h +++ b/src/system_info.h @@ -141,7 +141,8 @@ int get_boot_time(struct timeval *boot_time); * count: return the count of the array * return: error no , 0 success, != 0 fail */ -int get_mounted_filesystems(struct fast_statfs *stats, const int size, int *count); +int get_mounted_filesystems(struct fast_statfs *stats, + const int size, int *count); #if defined(OS_LINUX) || defined(OS_FREEBSD) /** get processes