From 641a9d953e86685f9ca2f3da72e9a94e5bcfd69e Mon Sep 17 00:00:00 2001 From: Philipp Takacs Date: Sun, 2 Apr 2017 23:13:42 +0200 Subject: [PATCH] mh_xstrdup arguments now const this is better to avoid errors and required by my pick rewrite --- h/utils.h | 2 +- sbr/utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/h/utils.h b/h/utils.h index 13964b2..1d55b59 100644 --- a/h/utils.h +++ b/h/utils.h @@ -9,7 +9,7 @@ char *pwd(void); char *add(const char *, char *); void create_folder(char *, int, void (*)(int)); int num_digits(int); -char *mh_xstrdup(char *); +char *mh_xstrdup(const char *); struct msgs_array { int max, size; diff --git a/sbr/utils.c b/sbr/utils.c index ef0ee97..50060ae 100644 --- a/sbr/utils.c +++ b/sbr/utils.c @@ -225,7 +225,7 @@ app_msgarg(struct msgs_array *msgs, char *cp) ** string of length 0. */ char * -mh_xstrdup(char * s) +mh_xstrdup(const char * s) { char * tmp; tmp = strdup(s ? s : ""); -- 1.7.10.4