diff options
author | Simo Sorce <idra@samba.org> | 2002-07-14 22:21:40 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2002-07-14 22:21:40 +0000 |
commit | 050126e6844519c0587776932063e54b5f2c527c (patch) | |
tree | b05ea046219fa9f3f0889cc82328d7cb8e44e436 /source3/lib/util_str.c | |
parent | 13157d1494b99bf85632120c27286ba4d877a68f (diff) | |
download | samba-050126e6844519c0587776932063e54b5f2c527c.tar.gz samba-050126e6844519c0587776932063e54b5f2c527c.tar.bz2 samba-050126e6844519c0587776932063e54b5f2c527c.zip |
addedd new (t)alloc_sub_* functions
they will get a const string and return a (t)alloced epanded one.
also modified passdb/* stuff to use this one.
(This used to be commit d378ac1e2efb0efc9a0f983d69cf678ca6255fd5)
Diffstat (limited to 'source3/lib/util_str.c')
-rw-r--r-- | source3/lib/util_str.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 4c8d5d8bf7..88a72f1536 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -762,7 +762,7 @@ char *realloc_string_sub(char *string, const char *pattern, const char *insert) return NULL; } string = t; - s = t + (p - s); + p = t + (p - s); } if (li != lp) { memmove(p+li,p+lp,strlen(p+lp)+1); @@ -992,7 +992,7 @@ void strlower_m(char *s) /******************************************************************* duplicate convert a string to lower case ********************************************************************/ -char *strdup_lower(char *s) +char *strdup_lower(const char *s) { char *t = strdup(s); if (t == NULL) { @@ -1026,7 +1026,7 @@ void strupper_m(char *s) /******************************************************************* convert a string to upper case ********************************************************************/ -char *strdup_upper(char *s) +char *strdup_upper(const char *s) { char *t = strdup(s); if (t == NULL) { |