trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [2/3] trafficserver git commit: TS-3284 Remove ink_strncpy() and ink_strlcpy()
Date Fri, 09 Jan 2015 14:57:52 GMT
TS-3284 Remove ink_strncpy() and ink_strlcpy()


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/fc4bce1e
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/fc4bce1e
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/fc4bce1e

Branch: refs/heads/master
Commit: fc4bce1e9aad461b82f54ef33399c5a465551221
Parents: a1a30aa
Author: Leif Hedstrom <zwoop@apache.org>
Authored: Fri Jan 9 07:42:54 2015 -0700
Committer: Leif Hedstrom <zwoop@apache.org>
Committed: Fri Jan 9 07:42:54 2015 -0700

----------------------------------------------------------------------
 lib/ts/ink_string.cc | 48 -----------------------------------------------
 lib/ts/ink_string.h  |  2 --
 2 files changed, 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fc4bce1e/lib/ts/ink_string.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_string.cc b/lib/ts/ink_string.cc
index 3307381..c079b5e 100644
--- a/lib/ts/ink_string.cc
+++ b/lib/ts/ink_string.cc
@@ -43,54 +43,6 @@ ink_memcpy_until_char(char *dst, char *src, unsigned int n, unsigned char
c)
 
 /*---------------------------------------------------------------------------*
 
-  char *ink_strncpy(char *dest, char *src, int n)
-
-  This routine is a safer version of strncpy which always NUL terminates
-  the destination string.  Note that this routine has the SAME semantics
-  as strncpy, such as copying exactly n bytes, padding dest with NULs
-  is necessary.  Use ink_string_copy for a non-padding version.
-
- *---------------------------------------------------------------------------*/
-
-char *
-ink_strncpy(char *dest, const char *src, int n)
-{
-  if (likely(src && dest)) {
-    if (n > 1)
-      strncpy(dest, src, (n - 1));
-    if (n > 0)
-      dest[n - 1] = '\0';
-  }
-
-  return (dest);
-}                               /* End ink_strncpy */
-
-/*---------------------------------------------------------------------------*
-
-  char *ink_strncat(char *dest, char *src, int n)
-
-  This routine is a safer version of strncat which always NUL terminates
-  the destination string.  Note that this routine has the SAME semantics
-  as strncat, such as concatinating exactly n bytes, padding dest with NULs
-  is necessary.  Use ink_string_copy for a non-padding version.
-
- *---------------------------------------------------------------------------*/
-
-char *
-ink_strncat(char *dest, const char *src, int n)
-{
-  if (likely(src && dest)) {
-    if (n > 1)
-      strncat(dest, src, (n - 1));
-    if (n > 0)
-      dest[n - 1] = '\0';
-  }
-
-  return (dest);
-}                               /* End ink_strncat */
-
-/*---------------------------------------------------------------------------*
-
   char *ink_string_concatenate_strings(char *dest, ...)
 
   This routine concatenates a variable number of strings into the buffer

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fc4bce1e/lib/ts/ink_string.h
----------------------------------------------------------------------
diff --git a/lib/ts/ink_string.h b/lib/ts/ink_string.h
index 7048ada..a822cc5 100644
--- a/lib/ts/ink_string.h
+++ b/lib/ts/ink_string.h
@@ -50,8 +50,6 @@
 /* these are supposed to be fast */
 
 inkcoreapi char *ink_memcpy_until_char(char *dst, char *src, unsigned int n, unsigned char
c);
-inkcoreapi char *ink_strncpy(char *dest, const char *src, int n);
-inkcoreapi char *ink_strncat(char *dest, const char *src, int n);
 inkcoreapi char *ink_string_concatenate_strings(char *dest, ...);
 inkcoreapi char *ink_string_concatenate_strings_n(char *dest, int n, ...);
 inkcoreapi char *ink_string_append(char *dest, char *src, int n);


Mime
View raw message