From 6bd571e060d65257c9a7ba0f87c991dbdac0b582 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Fri, 25 Sep 2009 21:59:57 +0000 Subject: drop some dead code, clarify small comments and small cleanups to malloc.c Signed-off-by: Stefan Reinauer Acked-by: Stefan Reinauer git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4677 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/include/stdlib.h | 7 +------ src/include/string.h | 9 +++------ 2 files changed, 4 insertions(+), 12 deletions(-) (limited to 'src/include') diff --git a/src/include/stdlib.h b/src/include/stdlib.h index c3052bd209..63a316f186 100644 --- a/src/include/stdlib.h +++ b/src/include/stdlib.h @@ -12,13 +12,8 @@ #define MAX(a,b) ((a) > (b) ? (a) : (b)) #ifndef __ROMCC__ -extern void *malloc(size_t size); +void *malloc(size_t size); void free(void *ptr); - -/* Extensions to malloc... */ -typedef size_t malloc_mark_t; -void malloc_mark(malloc_mark_t *place); -void malloc_release(malloc_mark_t *place); #endif #endif /* STDLIB_H */ diff --git a/src/include/string.h b/src/include/string.h index c7902e1f95..1b092a6c2a 100644 --- a/src/include/string.h +++ b/src/include/string.h @@ -8,14 +8,11 @@ void *memcpy(void *dest, const void *src, size_t n); void *memmove(void *dest, const void *src, size_t n); void *memset(void *s, int c, size_t n); int memcmp(const void *s1, const void *s2, size_t n); +#ifndef __ROMCC__ int sprintf(char * buf, const char *fmt, ...); +#endif -// yes, linux has fancy ones. We don't care. This stuff gets used -// hardly at all. And the pain of including those files is just too high. - -//extern inline void strcpy(char *dst, char *src) {while (*src) *dst++ = *src++;} - -//extern inline int strlen(char *src) { int i = 0; while (*src++) i++; return i;} +// simple string functions static inline size_t strnlen(const char *src, size_t max) { -- cgit v1.2.3