summaryrefslogtreecommitdiff
path: root/lib/util/string_wrappers.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-05-03 16:43:27 -0700
committerJeremy Allison <jra@samba.org>2011-05-04 22:14:14 +0200
commitff215f5c89c91a22c910400c8ac81d82d7459ba0 (patch)
treef94e9884bc1058e0726f676371c45df3ccdb3747 /lib/util/string_wrappers.h
parent8380835fc6de38706d9af29dc7f0fa4cec4f9c90 (diff)
downloadsamba-ff215f5c89c91a22c910400c8ac81d82d7459ba0.tar.gz
samba-ff215f5c89c91a22c910400c8ac81d82d7459ba0.tar.bz2
samba-ff215f5c89c91a22c910400c8ac81d82d7459ba0.zip
I added them, so I get to kill them :-). Finally remove all uses of safe_strcpy and safe_strcat. Change to strlcpy, strlcat.
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed May 4 22:14:14 CEST 2011 on sn-devel-104
Diffstat (limited to 'lib/util/string_wrappers.h')
-rw-r--r--lib/util/string_wrappers.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/util/string_wrappers.h b/lib/util/string_wrappers.h
index 80d0b9932a..7baf3cb21b 100644
--- a/lib/util/string_wrappers.h
+++ b/lib/util/string_wrappers.h
@@ -52,26 +52,12 @@ size_t __unsafe_string_function_usage_here_size_t__(void);
#define nstrcpy(d,s) strlcpy((d), (s) ? (s) : "",sizeof(nstring))
#define unstrcpy(d,s) strlcpy((d), (s) ? (s) : "",sizeof(unstring))
-/* the addition of the DEVELOPER checks in safe_strcpy means we must
- * update a lot of code. To make this a little easier here are some
- * functions that provide the lengths with less pain */
-
#ifdef HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS
/* if the compiler will optimize out function calls, then use this to tell if we are
have the correct types (this works only where sizeof() returns the size of the buffer, not
the size of the pointer). */
-#define safe_strcpy(d, s, max_len) \
- (CHECK_STRING_SIZE(d, max_len+1) \
- ? __unsafe_string_function_usage_here__() \
- : safe_strcpy_fn((d), (s), (max_len)))
-
-#define safe_strcat(d, s, max_len) \
- (CHECK_STRING_SIZE(d, max_len+1) \
- ? __unsafe_string_function_usage_here__() \
- : safe_strcat_fn((d), (s), (max_len)))
-
#define push_string_check(dest, src, dest_len, flags) \
(CHECK_STRING_SIZE(dest, dest_len) \
? __unsafe_string_function_usage_here_size_t__() \
@@ -105,8 +91,6 @@ size_t __unsafe_string_function_usage_here_size_t__(void);
#else
-#define safe_strcpy safe_strcpy_fn
-#define safe_strcat safe_strcat_fn
#define push_string_check push_string_check_fn
#define clistr_push clistr_push_fn
#define clistr_pull clistr_pull_fn