@@ -45,7 +45,7 @@ void set_verblevel(int level)
4545 verblevel = level ;
4646}
4747
48- bool set_logfile (char * file_name )
48+ bool set_logfile (const char * file_name )
4949{
5050 logfile = fopen (file_name , "w" );
5151 return logfile != NULL ;
@@ -161,7 +161,7 @@ void report_noreturn(int level, char *fmt, ...)
161161/* Functions denoting failures */
162162
163163/* Need to be able to print without using malloc */
164- static void fail_fun (char * format , char * msg )
164+ static void fail_fun (const char * format , const char * msg )
165165{
166166 snprintf (fail_buf , sizeof (fail_buf ), format , msg );
167167 /* Tack on return */
@@ -209,7 +209,7 @@ static void check_exceed(size_t new_bytes)
209209}
210210
211211/* Call malloc & exit if fails */
212- void * malloc_or_fail (size_t bytes , char * fun_name )
212+ void * malloc_or_fail (size_t bytes , const char * fun_name )
213213{
214214 check_exceed (bytes );
215215 void * p = malloc (bytes );
@@ -228,7 +228,7 @@ void *malloc_or_fail(size_t bytes, char *fun_name)
228228}
229229
230230/* Call calloc returns NULL & exit if fails */
231- void * calloc_or_fail (size_t cnt , size_t bytes , char * fun_name )
231+ void * calloc_or_fail (size_t cnt , size_t bytes , const char * fun_name )
232232{
233233 check_exceed (cnt * bytes );
234234 void * p = calloc (cnt , bytes );
@@ -246,7 +246,7 @@ void *calloc_or_fail(size_t cnt, size_t bytes, char *fun_name)
246246 return p ;
247247}
248248
249- char * strsave_or_fail (char * s , char * fun_name )
249+ char * strsave_or_fail (const char * s , const char * fun_name )
250250{
251251 if (!s )
252252 return NULL ;
0 commit comments