mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-05-08 10:08:47 +00:00
libc: Introduce cdefs.h, assert.h and strlen.c
Change-Id: I76091d52571f1950111c4b1670d5fc3883607715 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
This commit is contained in:
parent
4661abc7c4
commit
8bb6de1518
3 changed files with 84 additions and 0 deletions
17
lib/libc/strlen.c
Normal file
17
lib/libc/strlen.c
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
size_t strlen(const char *s)
|
||||
{
|
||||
const char *cursor = s;
|
||||
|
||||
while (*cursor)
|
||||
cursor++;
|
||||
|
||||
return cursor - s;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue