From 5651557cadbffddcc7d51e2d8cd2f9559ecd05c0 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Thu, 27 Nov 2025 00:08:17 +0100 Subject: Only verify that path isn't null --- FICS/settings.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'FICS/settings.cpp') diff --git a/FICS/settings.cpp b/FICS/settings.cpp index 8b01422..e57e9b6 100644 --- a/FICS/settings.cpp +++ b/FICS/settings.cpp @@ -260,12 +260,10 @@ settings_read_conf(const char *path) { FILE *fp = nullptr; - if (!is_regular_file(path)) { - errx(1, "%s: either the config file is nonexistent" - " -- or it isn't a regular file", __func__); - } else if ((fp = fopen(path, "r")) == nullptr) { + if (path == nullptr) + errx(1, "%s: null path", __func__); + else if ((fp = fopen(path, "r")) == nullptr) err(1, "%s: fopen", __func__); - } Interpreter_processAllLines(fp, path, is_recognized_setting, install_setting); -- cgit v1.2.3