lib: Remove StrnCpy
[samba.git] / source3 / lib / util_str.c
index eb36478d8a21abb3139d183c68fa4558424538f0..8568af46c172f98c50189dc815061b7e3bcf057c 100644 (file)
@@ -170,32 +170,6 @@ bool trim_char(char *s,char cfront,char cback)
        return ret;
 }
 
-/**
- Like strncpy but always null terminates. Make sure there is room!
- The variable n should always be one less than the available size.
-**/
-char *StrnCpy(char *dest,const char *src,size_t n)
-{
-       char *d = dest;
-
-       if (!dest) {
-               smb_panic("ERROR: NULL dest in StrnCpy");
-       }
-
-       if (!src) {
-               *dest = 0;
-               return(dest);
-       }
-
-       while (n-- && (*d = *src)) {
-               d++;
-               src++;
-       }
-
-       *d = 0;
-       return(dest);
-}
-
 /**
  Check if a string is part of a list.
 **/