summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-04-08 12:55:28 +1000
committerAndrew Tridgell <tridge@samba.org>2011-04-13 14:47:07 +1000
commitb2e37d9ce12627883ff18ab22ed9d3b6233f6baf (patch)
tree9b03862a422a4ccdac26cf71c8d9c25771f43a4c /lib
parent2eea91957c90d6a5960b5350d2c4664812260a7b (diff)
downloadsamba-b2e37d9ce12627883ff18ab22ed9d3b6233f6baf.tar.gz
samba-b2e37d9ce12627883ff18ab22ed9d3b6233f6baf.tar.bz2
samba-b2e37d9ce12627883ff18ab22ed9d3b6233f6baf.zip
lib/util ucs2_align is identical, put it in common
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/util/util_str.c7
-rw-r--r--lib/util/util_str_common.c7
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/util/util_str.c b/lib/util/util_str.c
index f31a8c5598..7fa531f0e4 100644
--- a/lib/util/util_str.c
+++ b/lib/util/util_str.c
@@ -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.
**/
diff --git a/lib/util/util_str_common.c b/lib/util/util_str_common.c
index e003d73d74..9999ee440e 100644
--- a/lib/util/util_str_common.c
+++ b/lib/util/util_str_common.c
@@ -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;
+}