summaryrefslogtreecommitdiff
path: root/sysctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysctl.c')
-rw-r--r--sysctl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sysctl.c b/sysctl.c
index ee03ee9..b4e0dea 100644
--- a/sysctl.c
+++ b/sysctl.c
@@ -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) {