summaryrefslogtreecommitdiffstats
path: root/source/include/safe_string.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-03 15:19:22 -0800
committerJeremy Allison <jra@samba.org>2007-12-03 15:19:22 -0800
commite72bce5b62fb0a9d0ff4a3d76490219994f303cf (patch)
tree3ddf00a58169fa5783cfe452ef8a5ef79f494bb4 /source/include/safe_string.h
parent7722a7d2c63f84b8105aa775b39f0ceedd4ed513 (diff)
downloadsamba-e72bce5b62fb0a9d0ff4a3d76490219994f303cf.tar.gz
samba-e72bce5b62fb0a9d0ff4a3d76490219994f303cf.tar.xz
samba-e72bce5b62fb0a9d0ff4a3d76490219994f303cf.zip
Remove unused wpstring and macros. Stop using pstrcpy in smbd/*.c
Jeremy.
Diffstat (limited to 'source/include/safe_string.h')
-rw-r--r--source/include/safe_string.h31
1 files changed, 0 insertions, 31 deletions
diff --git a/source/include/safe_string.h b/source/include/safe_string.h
index 7a60ad695e0..53ee7d312e3 100644
--- a/source/include/safe_string.h
+++ b/source/include/safe_string.h
@@ -86,26 +86,6 @@ size_t __unsafe_string_function_usage_here_char__(void);
#define CHECK_STRING_SIZE(d, len) (sizeof(d) != (len) && sizeof(d) != sizeof(char *))
-#define fstrterminate(d) (CHECK_STRING_SIZE(d, sizeof(fstring)) \
- ? __unsafe_string_function_usage_here_char__() \
- : (((d)[sizeof(fstring)-1]) = '\0'))
-#define pstrterminate(d) (CHECK_STRING_SIZE(d, sizeof(pstring)) \
- ? __unsafe_string_function_usage_here_char__() \
- : (((d)[sizeof(pstring)-1]) = '\0'))
-
-#define wpstrcpy(d,s) ((sizeof(d) != sizeof(wpstring) && sizeof(d) != sizeof(smb_ucs2_t *)) \
- ? __unsafe_string_function_usage_here__() \
- : safe_strcpy_w((d),(s),sizeof(wpstring)))
-#define wpstrcat(d,s) ((sizeof(d) != sizeof(wpstring) && sizeof(d) != sizeof(smb_ucs2_t *)) \
- ? __unsafe_string_function_usage_here__() \
- : safe_strcat_w((d),(s),sizeof(wpstring)))
-#define wfstrcpy(d,s) ((sizeof(d) != sizeof(wfstring) && sizeof(d) != sizeof(smb_ucs2_t *)) \
- ? __unsafe_string_function_usage_here__() \
- : safe_strcpy_w((d),(s),sizeof(wfstring)))
-#define wfstrcat(d,s) ((sizeof(d) != sizeof(wfstring) && sizeof(d) != sizeof(smb_ucs2_t *)) \
- ? __unsafe_string_function_usage_here__() \
- : safe_strcat_w((d),(s),sizeof(wfstring)))
-
#define push_pstring_base(dest, src, pstring_base) \
(CHECK_STRING_SIZE(pstring_base, sizeof(pstring)) \
? __unsafe_string_function_usage_here_size_t__() \
@@ -113,14 +93,6 @@ size_t __unsafe_string_function_usage_here_char__(void);
#else /* HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS */
-#define fstrterminate(d) (((d)[sizeof(fstring)-1]) = '\0')
-#define pstrterminate(d) (((d)[sizeof(pstring)-1]) = '\0')
-
-#define wpstrcpy(d,s) safe_strcpy_w((d),(s),sizeof(wpstring))
-#define wpstrcat(d,s) safe_strcat_w((d),(s),sizeof(wpstring))
-#define wfstrcpy(d,s) safe_strcpy_w((d),(s),sizeof(wfstring))
-#define wfstrcat(d,s) safe_strcat_w((d),(s),sizeof(wfstring))
-
#define push_pstring_base(dest, src, pstring_base) \
push_ascii(dest, src, sizeof(pstring)-PTR_DIFF(dest,pstring_base)-1, STR_TERMINATE)
@@ -143,9 +115,6 @@ size_t __unsafe_string_function_usage_here_char__(void);
/* 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 */
-#define pstrcpy_base(dest, src, pstring_base) \
- safe_strcpy(dest, src, sizeof(pstring)-PTR_DIFF(dest,pstring_base)-1)
-
/* Inside the _fn variants of these is a call to clobber_region(), -
* which might destroy the stack on a buggy function. We help the