From b2c9eff43c49d528c7ad3d0d91d03ccf0ae5ae0f Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 8 Feb 2013 01:10:40 +0000 Subject: Remove CHECK_BOUNDS_LOW and CHECK_BOUNDS_HIGH for C code. --- string/strcpy.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'string') diff --git a/string/strcpy.c b/string/strcpy.c index a2bb8efcb3..9b713dcaa1 100644 --- a/string/strcpy.c +++ b/string/strcpy.c @@ -18,7 +18,6 @@ #include #include #include -#include #undef strcpy @@ -29,8 +28,8 @@ strcpy (dest, src) const char *src; { char c; - char *__unbounded s = (char *__unbounded) CHECK_BOUNDS_LOW (src); - const ptrdiff_t off = CHECK_BOUNDS_LOW (dest) - s - 1; + char *__unbounded s = (char *__unbounded) src; + const ptrdiff_t off = dest - s - 1; size_t n; do @@ -41,8 +40,6 @@ strcpy (dest, src) while (c != '\0'); n = s - src; - (void) CHECK_BOUNDS_HIGH (src + n); - (void) CHECK_BOUNDS_HIGH (dest + n); return dest; } -- cgit v1.2.3