diff options
author | peter <peter@FreeBSD.org> | 2004-04-15 01:41:05 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2004-04-15 01:41:05 +0000 |
commit | f38d95d3031d07e05282d962231482b7cb1d3442 (patch) | |
tree | 23742f01b9a56cc1fb86dcb5b3ec19bcfcb1a0d4 /contrib/cvs | |
parent | ad4edd00d34157ee7148b6844fbbdaf65d2ab37c (diff) | |
download | FreeBSD-src-f38d95d3031d07e05282d962231482b7cb1d3442.zip FreeBSD-src-f38d95d3031d07e05282d962231482b7cb1d3442.tar.gz |
Change WriteTemplate to take const char * args.
The Name_Root() call seems to be defunct, remove it because it was
causing compile problems. The real magic seems to be in the Parse_Info()
callback (which was also updated for const char * args).
Diffstat (limited to 'contrib/cvs')
-rw-r--r-- | contrib/cvs/src/cvs.h | 2 | ||||
-rw-r--r-- | contrib/cvs/src/entries.c | 10 |
2 files changed, 4 insertions, 8 deletions
diff --git a/contrib/cvs/src/cvs.h b/contrib/cvs/src/cvs.h index 68d46cc..f59a9ca 100644 --- a/contrib/cvs/src/cvs.h +++ b/contrib/cvs/src/cvs.h @@ -580,7 +580,7 @@ void ParseTag PROTO((char **tagp, char **datep, int *nonbranchp)); void WriteTag PROTO ((const char *dir, const char *tag, const char *date, int nonbranch, const char *update_dir, const char *repository)); -void WriteTemplate PROTO ((char *dir, char *update_dir)); +void WriteTemplate PROTO ((const char *dir, const char *update_dir)); void cat_module PROTO((int status)); void check_entries PROTO((char *dir)); void close_module PROTO((DBM * db)); diff --git a/contrib/cvs/src/entries.c b/contrib/cvs/src/entries.c index 98cb006..1ab7c7e 100644 --- a/contrib/cvs/src/entries.c +++ b/contrib/cvs/src/entries.c @@ -641,7 +641,7 @@ AddEntryNode (list, entdata) static char *root_template; static int -get_root_template(char *repository, char *path) +get_root_template(const char *repository, const char *path) { if (root_template) { if (strcmp(path, root_template) == 0) @@ -658,19 +658,16 @@ get_root_template(char *repository, char *path) */ void WriteTemplate (dir, update_dir) - char *dir; - char *update_dir; + const char *dir; + const char *update_dir; { char *tmp = NULL; - char *root = NULL; struct stat st1; struct stat st2; if (Parse_Info(CVSROOTADM_RCSINFO, "cvs", get_root_template, 1) < 0) return; - if ((root = Name_Root(dir, update_dir)) == NULL) - error (1, errno, "unable to locate cvs root"); if (asprintf(&tmp, "%s/%s", dir, CVSADM_TEMPLATE) < 0) error (1, errno, "out of memory"); @@ -705,7 +702,6 @@ WriteTemplate (dir, update_dir) } } free(tmp); - free(root); } /* |