summaryrefslogtreecommitdiffstats
path: root/src/core/stringextra.c
diff options
context:
space:
mode:
authorHolger Lubitz2007-08-02 01:47:31 +0200
committerHolger Lubitz2007-08-02 01:47:31 +0200
commit6b6dbe5600e60897d56be9551a5c3f7dc567f008 (patch)
tree6258838f3a7edf9fa38b0881c71c37a0d15bd445 /src/core/stringextra.c
parentdeclare pointers passed to string functions as nonnull (diff)
downloadipxe-6b6dbe5600e60897d56be9551a5c3f7dc567f008.tar.gz
ipxe-6b6dbe5600e60897d56be9551a5c3f7dc567f008.tar.xz
ipxe-6b6dbe5600e60897d56be9551a5c3f7dc567f008.zip
move strndup back to string.c - used by strdup
Diffstat (limited to 'src/core/stringextra.c')
-rw-r--r--src/core/stringextra.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/core/stringextra.c b/src/core/stringextra.c
index bd45ae89..c2be4fc4 100644
--- a/src/core/stringextra.c
+++ b/src/core/stringextra.c
@@ -271,18 +271,3 @@ void * memscan(const void * addr, int c, size_t size)
return (void *) p;
}
#endif
-
-char * strndup(const char *s, size_t n)
-{
- size_t len = strlen(s);
- char *new;
-
- if (len>n)
- len = n;
- new = malloc(len+1);
- if (new) {
- new[len] = '\0';
- memcpy(new,s,len);
- }
- return new;
-}