From: Philipp Takacs Date: Sun, 2 Apr 2017 21:13:42 +0000 (+0200) Subject: mh_xstrdup arguments now const X-Git-Tag: mmh-0.4~10^2~9 X-Git-Url: http://git.marmaro.de/?p=mmh;a=commitdiff_plain;h=641a9d953e86685f9ca2f3da72e9a94e5bcfd69e mh_xstrdup arguments now const this is better to avoid errors and required by my pick rewrite --- 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 : "");