From 054559dc9367b893f50599c7e3c8e624be9a53e4 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 15 Oct 2019 16:27:36 +0200 Subject: [PATCH] tweaks: rename three variables, to be more descriptive --- src/utils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils.c b/src/utils.c index 9530599b..cd3c7d06 100644 --- a/src/utils.c +++ b/src/utils.c @@ -324,14 +324,14 @@ char *mallocstrcpy(char *dest, const char *src) return dest; } -/* Return an allocated copy of the first n characters of the given string. */ -char *measured_copy(const char *src, size_t n) +/* Return an allocated copy of the first count characters of the given string. */ +char *measured_copy(const char *string, size_t count) { - char *dest = charalloc(n); + char *thecopy = charalloc(count); - strncpy(dest, src, n); + strncpy(thecopy, string, count); - return dest; + return thecopy; } /* Return an allocated copy of the given string. */