From 5fed2a667096341160db8643a4a057e328953a1d Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Mon, 4 Mar 2013 15:11:38 -0800 Subject: Rename Strncat to StrnAppend, use it instead of strncat. Strncat() looks almost like strncat(), but it's completely different. Change the name to reduce confusion. Also fix a place where strncat() was misused anyway. BUG=none BRANCH=all TEST=manual sudo FEATURES=test emerge vboot_reference FEATURES=test emerge-$BOARD vboot_reference Change-Id: I39c30d391aa6566ec67461462e800720ade66a91 Signed-off-by: Bill Richardson Reviewed-on: https://gerrit.chromium.org/gerrit/44572 --- firmware/lib/utility_string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'firmware/lib/utility_string.c') diff --git a/firmware/lib/utility_string.c b/firmware/lib/utility_string.c index b1b1a391..4a7e3e38 100644 --- a/firmware/lib/utility_string.c +++ b/firmware/lib/utility_string.c @@ -52,11 +52,11 @@ uint32_t Uint64ToString(char *buf, uint32_t bufsize, uint64_t value, return usedsize - 1; } -uint32_t Strncat(char *dest, const char *src, uint32_t destlen) +uint32_t StrnAppend(char *dest, const char *src, uint32_t destlen) { uint32_t used = 0; - if (!dest || !src) + if (!dest || !src || !destlen) return 0; /* Skip past existing string in destination.*/ -- cgit v1.2.1