mh_xstrdup arguments now const
authorPhilipp Takacs <philipp@bureaucracy.de>
Sun, 2 Apr 2017 21:13:42 +0000 (23:13 +0200)
committerPhilipp Takacs <philipp@bureaucracy.de>
Sun, 28 May 2017 12:06:39 +0000 (14:06 +0200)
this is better to avoid errors and required
by my pick rewrite

h/utils.h
sbr/utils.c

index 13964b2..1d55b59 100644 (file)
--- 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 *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;
 
 struct msgs_array {
        int max, size;
index ef0ee97..50060ae 100644 (file)
@@ -225,7 +225,7 @@ app_msgarg(struct msgs_array *msgs, char *cp)
 ** string of length 0.
 */
 char *
 ** string of length 0.
 */
 char *
-mh_xstrdup(char * s)
+mh_xstrdup(const char * s)
 {
        char * tmp;
        tmp = strdup(s ? s : "");
 {
        char * tmp;
        tmp = strdup(s ? s : "");