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/d42ab414c8bce17b6b437ef9ebfd194a8ac4111c?hp=86ac0f5e76979de35bafd5198a75bfe354d2729a Added const to arg of m_backup(). --- diff --git a/h/prototypes.h b/h/prototypes.h index ef02f9a6..dda355a7 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -244,7 +244,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