1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

lib/util ucs2_align is identical, put it in common

Signed-off-by: Andrew Tridgell <tridge@samba.org>
This commit is contained in:
Andrew Bartlett 2011-04-08 12:55:28 +10:00 committed by Andrew Tridgell
parent 2eea91957c
commit b2e37d9ce1
3 changed files with 7 additions and 14 deletions

View 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.
**/

View 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;
}

View 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.