From: David Levine Date: Sun, 12 Jun 2016 14:36:43 +0000 (-0400) Subject: Added const to arg of m_backup(). X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/d9d10cd9d6a48c7d64f4882b3b5dee9adf16f9e3?hp=3c5fba356eb42adf87e7d6e8728c55dd4fcd658f Added const to arg of m_backup(). (cherry picked from commit d42ab414c8bce17b6b437ef9ebfd194a8ac4111c) --- diff --git a/h/prototypes.h b/h/prototypes.h index daa1c61a..8a7d1f70 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -212,7 +212,7 @@ int lkopendata(const char *, int, mode_t, int *); FILE *lkfopenspool(const char *, const char *); int lkopenspool(const char *, int, mode_t, int *); int m_atoi (char *); -char *m_backup (char *); +char *m_backup (const char *); int m_convert (struct msgs *, char *); char *m_draft (char *, char *, int, int *); void m_getfld_state_reset (m_getfld_state_t *); diff --git a/sbr/m_backup.c b/sbr/m_backup.c index 5e24a033..9ba5a3b5 100644 --- a/sbr/m_backup.c +++ b/sbr/m_backup.c @@ -11,12 +11,12 @@ char * -m_backup (char *file) +m_backup (const char *file) { - char *cp; + const char *cp; static char buffer[BUFSIZ]; - if ((cp = r1bindex(file, '/')) == file) + if ((cp = r1bindex((char *) file, '/')) == file) snprintf(buffer, sizeof(buffer), "%s%s", BACKUP_PREFIX, cp); else