diff --git a/lib/isc/include/isc/file.h b/lib/isc/include/isc/file.h index d306cbbe80..25d1f64c5e 100644 --- a/lib/isc/include/isc/file.h +++ b/lib/isc/include/isc/file.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: file.h,v 1.12 2000/10/03 05:45:38 marka Exp $ */ +/* $Id: file.h,v 1.13 2000/10/20 22:09:00 gson Exp $ */ #ifndef ISC_FILE_H #define ISC_FILE_H 1 @@ -172,19 +172,18 @@ isc_file_isabsolute(const char *filename); */ isc_result_t -isc_file_template(const char *path, const char *templat, char *buf, - size_t buflen); +isc_file_template(const char *path, const char *templet, char *buf, + size_t buflen); /* - * Create a OS specific template using 'path' to define the directory - * 'templat' to describe the filename and store the result in 'buf' + * Create an OS specific template using 'path' to define the directory + * 'templet' to describe the filename and store the result in 'buf' * such that path can be renamed to buf atomically. */ isc_result_t isc_file_renameunique(const char *file, char *templet); - /* - * Rename 'file' using 'templet' as template for the new file name. + * Rename 'file' using 'templet' as a template for the new file name. */ /* diff --git a/lib/isc/unix/file.c b/lib/isc/unix/file.c index 192b768a5f..0eb2f86036 100644 --- a/lib/isc/unix/file.c +++ b/lib/isc/unix/file.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: file.c,v 1.25 2000/10/19 01:10:24 bwelling Exp $ */ +/* $Id: file.c,v 1.26 2000/10/20 22:09:01 gson Exp $ */ #include @@ -121,30 +121,30 @@ isc_file_mktemplate(const char *path, char *buf, size_t buflen) { } isc_result_t -isc_file_template(const char *path, const char *templat, char *buf, +isc_file_template(const char *path, const char *templet, char *buf, size_t buflen) { char *s; REQUIRE(buf != NULL); - s = strrchr(templat, '/'); + s = strrchr(templet, '/'); if (s != NULL) - templat = s + 1; + templet = s + 1; s = strrchr(path, '/'); if (s != NULL) { - if ((s - path + 1 + strlen(templat) + 1) > buflen) + if ((s - path + 1 + strlen(templet) + 1) > buflen) return (ISC_R_NOSPACE); strncpy(buf, path, s - path + 1); buf[s - path + 1] = '\0'; - strcat(buf, templat); + strcat(buf, templet); } else { - if ((strlen(templat) + 1) > buflen) + if ((strlen(templet) + 1) > buflen) return (ISC_R_NOSPACE); - strcpy(buf, templat); + strcpy(buf, templet); } return (ISC_R_SUCCESS);