From 6a9bc86d62cc9ba532392af02a5d71e50b6b0411 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 18 Apr 2002 03:59:02 +0000 Subject: nicer strndup() function (This used to be commit 546764f3cbbefaad312386280dd2ebbbe5b4446d) --- source3/lib/util_str.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source3') diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index f6e579ddba..ff3559ce14 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -991,13 +991,13 @@ some platforms don't have strndup char *strndup(const char *s, size_t n) { char *ret; - int i; - for (i=0;s[i] && i