@@ -45,7 +45,7 @@ void set_verblevel(int level)
45
45
verblevel = level ;
46
46
}
47
47
48
- bool set_logfile (char * file_name )
48
+ bool set_logfile (const char * file_name )
49
49
{
50
50
logfile = fopen (file_name , "w" );
51
51
return logfile != NULL ;
@@ -161,7 +161,7 @@ void report_noreturn(int level, char *fmt, ...)
161
161
/* Functions denoting failures */
162
162
163
163
/* 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 )
165
165
{
166
166
snprintf (fail_buf , sizeof (fail_buf ), format , msg );
167
167
/* Tack on return */
@@ -209,7 +209,7 @@ static void check_exceed(size_t new_bytes)
209
209
}
210
210
211
211
/* 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 )
213
213
{
214
214
check_exceed (bytes );
215
215
void * p = malloc (bytes );
@@ -228,7 +228,7 @@ void *malloc_or_fail(size_t bytes, char *fun_name)
228
228
}
229
229
230
230
/* 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 )
232
232
{
233
233
check_exceed (cnt * bytes );
234
234
void * p = calloc (cnt , bytes );
@@ -246,7 +246,7 @@ void *calloc_or_fail(size_t cnt, size_t bytes, char *fun_name)
246
246
return p ;
247
247
}
248
248
249
- char * strsave_or_fail (char * s , char * fun_name )
249
+ char * strsave_or_fail (const char * s , const char * fun_name )
250
250
{
251
251
if (!s )
252
252
return NULL ;
0 commit comments