diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-05-01 15:18:00 +0200 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-05-01 15:18:00 +0200 |
commit | 9792bae80de32224e1eadb233f6d1338ff5ef354 (patch) | |
tree | 97631940eb4df989f09d42163377ff38d5d5492d /FICS/command.c | |
parent | 7b368abe5174317220183c7ecef31155ecc55e38 (diff) |
Added usage of warn()
Diffstat (limited to 'FICS/command.c')
-rw-r--r-- | FICS/command.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/FICS/command.c b/FICS/command.c index e934dcc..db25991 100644 --- a/FICS/command.c +++ b/FICS/command.c @@ -743,7 +743,8 @@ check_news(int p, int admin) news_dir); if ((fp = fopen(filename, "r")) == NULL) { - fprintf(stderr, "Can't find admin news index.\n"); + warn("%s: can't find admin news index (%s)", __func__, + filename); return; } @@ -780,7 +781,8 @@ check_news(int p, int admin) news_dir); if ((fp = fopen(filename, "r")) == NULL) { - fprintf(stderr, "Can't find news index.\n"); + warn("%s: can't find news index (%s)", __func__, + filename); return; } @@ -788,7 +790,8 @@ check_news(int p, int admin) num_news = count_lines(fp); fclose(fp); if ((fp = fopen(filename, "r")) == NULL) { - fprintf(stderr, "Can't find news index.\n"); + warn("%s: can't find news index (%s)", __func__, + filename); return; } } @@ -1247,15 +1250,16 @@ commands_init(void) snprintf(fname, sizeof fname, "%s/commands", comhelp_dir); if ((fp = fopen(fname, "w")) == NULL) { - fprintf(stderr, "FICS: Could not write commands help file.\n"); + warn("%s: could not write commands help file (%s)", __func__, + fname); return; } snprintf(fname, sizeof fname, "%s/admin_commands", adhelp_dir); if ((afp = fopen(fname, "w")) == NULL) { - fprintf(stderr, "FICS: Could not write admin_commands help " - "file.\n"); + warn("%s: could not write admin_commands help file (%s)", + __func__, fname); fclose(fp); return; } |