From fd6f5e3b5c9c35d7e7230e8838ffe0429e27fa89 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 31 Dec 2022 16:00:56 +0200 Subject: [PATCH 40/40] mapimg: Replace fopen() call with fc_fopen() See osdn #45507 Signed-off-by: Marko Lindqvist --- common/mapimg.c | 2 +- doc/CodingStyle | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/common/mapimg.c b/common/mapimg.c index 7cab5ee2cc..3017dee767 100644 --- a/common/mapimg.c +++ b/common/mapimg.c @@ -2323,7 +2323,7 @@ static bool img_save_ppm(const struct img *pimg, const char *mapimgfile) return FALSE; } - fp = fopen(ppmname, "w"); + fp = fc_fopen(ppmname, "w"); if (!fp) { MAPIMG_LOG(_("could not open file: %s"), ppmname); return FALSE; diff --git a/doc/CodingStyle b/doc/CodingStyle index a0fdda42d7..9625f6090c 100644 --- a/doc/CodingStyle +++ b/doc/CodingStyle @@ -532,6 +532,7 @@ have the 'fc_' prefix in their name. They are more portable (i.e always available with the freeciv source code) and often more secure than the functions available natively. +- Instead of fopen(), use fc_fopen() - Instead of localtime(), use fc_localtime() ============================================================================ -- 2.39.0