From be02c10637bf2098a19885e89fcbfe88c3e700f4 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Tue, 18 Feb 2020 22:39:38 +0100 Subject: [PATCH] add const declaration to newfopen --- src/include/ngspice/ngspice.h | 2 +- src/misc/util.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/ngspice/ngspice.h b/src/include/ngspice/ngspice.h index aafff44b6..8b3293176 100644 --- a/src/include/ngspice/ngspice.h +++ b/src/include/ngspice/ngspice.h @@ -221,7 +221,7 @@ extern double x_atanh(double); #ifndef EXT_ASC #if defined(__MINGW__) || defined(_MSC_VER) #define fopen newfopen -extern FILE *newfopen(char *fn, char* md); +extern FILE *newfopen(const char *fn, const char* md); #endif #endif diff --git a/src/misc/util.c b/src/misc/util.c index 0cd320cbb..132560903 100644 --- a/src/misc/util.c +++ b/src/misc/util.c @@ -264,7 +264,7 @@ ngdirname(const char *name) #undef BOOLEAN #include FILE * -newfopen(char *fn, char* md) +newfopen(const char *fn, const char* md) { if (fn == NULL) return NULL;