svn commit: samba r18040 - in branches/SAMBA_4_0/source/lib/replace: .

jelmer at samba.org jelmer at samba.org
Mon Sep 4 13:10:15 GMT 2006


Author: jelmer
Date: 2006-09-04 13:10:14 +0000 (Mon, 04 Sep 2006)
New Revision: 18040

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18040

Log:
Use only one strnlen implementation
Modified:
   branches/SAMBA_4_0/source/lib/replace/replace.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/replace.c
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/replace.c	2006-09-04 13:07:29 UTC (rev 18039)
+++ branches/SAMBA_4_0/source/lib/replace/replace.c	2006-09-04 13:10:14 UTC (rev 18040)
@@ -375,7 +375,7 @@
 /**
  Some platforms don't have strnlen
 **/
- size_t strnlen(const char *s, size_t max)
+ size_t rep_strnlen(const char *s, size_t max)
 {
         size_t len;
   
@@ -540,19 +540,6 @@
 }
 #endif
 
-#ifndef HAVE_STRNLEN
-/**
- Some platforms don't have strnlen
-**/
-size_t rep_strnlen(const char *s, size_t n)
-{
-	int i;
-	for (i=0; s[i] && i<n; i++)
-		/* noop */ ;
-	return i;
-}
-#endif
-
 #ifndef HAVE_STRTOLL
 long long int rep_strtoll(const char *str, char **endptr, int base)
 {



More information about the samba-cvs mailing list