]> diplodocus.org Git - nmh/commitdiff
Added const qualifier to arguments of concat() and copy().
authorDavid Levine <levinedl@acm.org>
Tue, 26 Feb 2013 04:46:00 +0000 (22:46 -0600)
committerDavid Levine <levinedl@acm.org>
Tue, 26 Feb 2013 04:46:00 +0000 (22:46 -0600)
h/prototypes.h
sbr/concat.c
sbr/copy.c

index a326319522bd3684014e3a2127cb988eb213740b..2d798e203a718676cf11ec8da26ae6138faef8b8 100644 (file)
@@ -40,14 +40,14 @@ char **brkstring (char *, char *, char *);
 int check_charset (char *, int);
 int client(char *, char *, char *, int, int);
 void closefds(int);
-char *concat (char *, ...);
+char *concat (const char *, ...);
 int context_del (char *);
 char *context_find (char *);
 int context_foil (char *);
 void context_read (void);
 void context_replace (char *, char *);
 void context_save (void);
-char *copy (char *, char *);
+char *copy (const char *, char *);
 char **copyip (char **, char **, int);
 void cpydata (int, int, char *, char *);
 void cpydgst (int, int, char *, char *);
index 82979f5aa0229e529000fe293279be5b4cc70e45..f5cf1aea816478e5effcf71546d6551f09d984ae 100644 (file)
@@ -13,7 +13,7 @@
 
 
 char *
-concat (char *s1, ...)
+concat (const char *s1, ...)
 {
     char *cp, *dp, *sp;
     size_t len;
index cc35e95b4ff1535846bc63537fc0128833c0a2d2..54474400f2eeaab866e625ec73bbaee8a236c786 100644 (file)
@@ -10,7 +10,7 @@
 #include <h/mh.h>
 
 char *
-copy(char *from, char *to)
+copy(const char *from, char *to)
 {
     while ((*to = *from)) {
        to++;