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 <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/44572
This commit is contained in:
Bill Richardson
2013-03-04 15:11:38 -08:00
committed by ChromeBot
parent 522da3e2c9
commit 5fed2a6670
6 changed files with 60 additions and 59 deletions

View File

@@ -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.*/