From d9d10cd9d6a48c7d64f4882b3b5dee9adf16f9e3 Mon Sep 17 00:00:00 2001 From: David Levine Date: Sun, 12 Jun 2016 10:36:43 -0400 Subject: [PATCH] Added const to arg of m_backup(). (cherry picked from commit d42ab414c8bce17b6b437ef9ebfd194a8ac4111c) --- h/prototypes.h | 2 +- sbr/m_backup.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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 -- 2.56.0