lib/util ucs2_align is identical, put it in common
authorAndrew Bartlett <abartlet@samba.org>
Fri, 8 Apr 2011 02:55:28 +0000 (12:55 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 13 Apr 2011 04:47:07 +0000 (14:47 +1000)
Signed-off-by: Andrew Tridgell <tridge@samba.org>
lib/util/util_str.c
lib/util/util_str_common.c
source3/lib/charcnv.c

index f31a8c5598682d647e0456ed2f20fc4df2319042..7fa531f0e44d92716f4731f2d06afd48f0fcadba 100644 (file)
@@ -249,13 +249,6 @@ _PUBLIC_ bool strequal(const char *s1, const char *s2)
        return strcasecmp(s1,s2) == 0;
 }
 
-_PUBLIC_ size_t ucs2_align(const void *base_ptr, const void *p, int flags)
-{
-       if (flags & (STR_NOALIGN|STR_ASCII))
-               return 0;
-       return PTR_DIFF(p, base_ptr) & 1;
-}
-
 /**
  String replace.
 **/
index e003d73d748eff0ea178e1beee049a7f6428b187..9999ee440ec7448a330a624aae8eba1c2847e371 100644 (file)
@@ -52,3 +52,10 @@ _PUBLIC_ int strwicmp(const char *psz1, const char *psz2)
        }
        return (*psz1 - *psz2);
 }
+
+_PUBLIC_ size_t ucs2_align(const void *base_ptr, const void *p, int flags)
+{
+       if (flags & (STR_NOALIGN|STR_ASCII))
+               return 0;
+       return PTR_DIFF(p, base_ptr) & 1;
+}
index edcccc25e71c157169955c15d6ac513d87508523..a8719070c3299207f93500b574c9bf629d64f6a6 100644 (file)
@@ -632,13 +632,6 @@ char *strlower_talloc(TALLOC_CTX *ctx, const char *s) {
        return talloc_strdup_lower(ctx, s);
 }
 
-size_t ucs2_align(const void *base_ptr, const void *p, int flags)
-{
-       if (flags & (STR_NOALIGN|STR_ASCII))
-               return 0;
-       return PTR_DIFF(p, base_ptr) & 1;
-}
-
 
 /**
  * Copy a string from a char* unix src to a dos codepage string destination.