diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-04-27 22:59:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:05:08 -0500 |
commit | eaaae31d1105a7abe31918c59ae9bfab0010bb51 (patch) | |
tree | e992d1c1ff99806004a0a60138108b8ec1aadc36 /source4/lib/util | |
parent | b00c2369069c41880598ff430776cc26e8f7b916 (diff) | |
download | samba-eaaae31d1105a7abe31918c59ae9bfab0010bb51.tar.gz samba-eaaae31d1105a7abe31918c59ae9bfab0010bb51.tar.bz2 samba-eaaae31d1105a7abe31918c59ae9bfab0010bb51.zip |
r15302: Remove strangely named function "StrnCpy" - strlcpy is available as a
replacement.
(This used to be commit 72237344cf22dacfaf1d87c3e0b922023fa4afb0)
Diffstat (limited to 'source4/lib/util')
-rw-r--r-- | source4/lib/util/util_str.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/source4/lib/util/util_str.c b/source4/lib/util/util_str.c index 60419e0510..34d37ecfbd 100644 --- a/source4/lib/util/util_str.c +++ b/source4/lib/util/util_str.c @@ -172,27 +172,6 @@ _PUBLIC_ char *safe_strcat(char *dest, const char *src, size_t maxlength) } /** - Like strncpy but always null terminates. Make sure there is room! - The variable n should always be one less than the available size. -**/ - -_PUBLIC_ char *StrnCpy(char *dest,const char *src,size_t n) -{ - char *d = dest; - if (!dest) - return(NULL); - if (!src) { - *dest = 0; - return(dest); - } - while (n-- && (*d++ = *src++)) - ; - *d = 0; - return(dest); -} - - -/** Routine to get hex characters and turn them into a 16 byte array. the array can be variable length, and any non-hex-numeric characters are skipped. "0xnn" or "0Xnn" is specially catered |