diff options
Diffstat (limited to 'sysctl.c')
-rw-r--r-- | sysctl.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -164,11 +164,6 @@ static int ReadSetting(const char *restrict const name) { outname = xstrdup(name); slashdot(outname,'/','.'); /* change / to . */ - if (pattern && !pattern_match(outname, pattern)){ - free(outname); - return 0; - } - /* used to open the file */ tmpname = xmalloc(strlen(name)+strlen(PROC_PATH)+2); strcpy(tmpname, PROC_PATH); @@ -198,6 +193,11 @@ static int ReadSetting(const char *restrict const name) { goto out; } + if (pattern && !pattern_match(outname, pattern)){ + free(outname); + return 0; + } + fp = fopen(tmpname, "r"); if (!fp) { |