s4-util: removed the valgrind_strlen() routine
authorAndrew Tridgell <tridge@samba.org>
Thu, 17 Feb 2011 23:44:46 +0000 (10:44 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 18 Feb 2011 04:09:47 +0000 (15:09 +1100)
this was for a bug in valgrind from 7 years ago.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

lib/util/util.h
lib/util/util_str.c

index 8f4fd8f70bc712add87c8847a31c127b033f9476..dc8a93077e31faf15458ba20b0f17e13d2a07ab5 100644 (file)
@@ -59,13 +59,6 @@ extern const char *panic_action;
            __FILE__, __LINE__, #b)); }} while (0)
 #endif
 
-#if _SAMBA_BUILD_ == 4
-#ifdef VALGRIND
-#define strlen(x) valgrind_strlen(x)
-size_t valgrind_strlen(const char *s);
-#endif
-#endif
-
 #ifndef ABS
 #define ABS(a) ((a)>0?(a):(-(a)))
 #endif
index 0ea71a8e3ca76a11d158380341c362e46dc8b9cf..8695266655c30ce5973d17084c15aba0778e1d38 100644 (file)
@@ -112,17 +112,6 @@ _PUBLIC_ char *safe_strcat(char *dest, const char *src, size_t maxlength)
        return dest;
 }
 
-#ifdef VALGRIND
-size_t valgrind_strlen(const char *s)
-{
-       size_t count;
-       for(count = 0; *s++; count++)
-               ;
-       return count;
-}
-#endif
-
-
 /**
   format a string into length-prefixed dotted domain format, as used in NBT
   and in some ADS structures