diff options
| author | Markus Uhlin <markus@nifty-networks.net> | 2025-11-27 00:08:17 +0100 |
|---|---|---|
| committer | Markus Uhlin <markus@nifty-networks.net> | 2025-11-27 00:08:17 +0100 |
| commit | 5651557cadbffddcc7d51e2d8cd2f9559ecd05c0 (patch) | |
| tree | 8a2b2da78071e819dc6d304e181dd97dae8bb2e4 /FICS | |
| parent | 9e5e76f2b5af9b821eb7bcdacad898048121e9d8 (diff) | |
Only verify that path isn't null
Diffstat (limited to 'FICS')
| -rw-r--r-- | FICS/settings.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
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); |
