aboutsummaryrefslogtreecommitdiffstats
path: root/libar2_earse.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-01-17 16:48:23 +0100
committerMattias Andrée <maandree@kth.se>2022-01-17 16:48:23 +0100
commit77511c68e4f8dad16bd215b541c53cd730d0df51 (patch)
tree0d1595551ec08d86b9cf592fa47fda1740ee087d /libar2_earse.c
parenttest: improve portability (diff)
downloadlibar2-77511c68e4f8dad16bd215b541c53cd730d0df51.tar.gz
libar2-77511c68e4f8dad16bd215b541c53cd730d0df51.tar.bz2
libar2-77511c68e4f8dad16bd215b541c53cd730d0df51.tar.xz
Fix typo: libar2_earse -> libar2_erase
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libar2_earse.c')
-rw-r--r--libar2_earse.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/libar2_earse.c b/libar2_earse.c
deleted file mode 100644
index 905695a..0000000
--- a/libar2_earse.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-#include "common.h"
-
-
-#if defined(memset_s)
-#elif defined(explicit_bzero) || defined(__OpenBSD__)
-#elif defined(explicit_memset)
-#else
-# if defined(__GNUC__)
-__attribute__((visibility("hidden")))
-# endif
-void *(*const volatile libar2_internal_explicit_memset__)(void *, int, size_t) = &memset;
-#endif
-
-
-#if defined(__clang__) /* before __GNUC__ because that is also set in clang */
-# if __has_attribute(optnone)
-__attribute__((optnone))
-# endif
-#elif defined(__GNUC__)
-# if __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ >= 40400
-__attribute__((optimize("O0")))
-# endif
-#endif
-void
-libar2_earse(volatile void *mem_, size_t size)
-{
- void *mem = *(void **)(void *)&mem_;
-#if defined(memset_s)
- memset_s(mem, size);
-#elif defined(explicit_bzero) || defined(__OpenBSD__)
- explicit_bzero(mem, size);
-#elif defined(explicit_memset)
- explicit_memset(mem, 0, size);
-#else
- libar2_internal_explicit_memset__(mem, 0, size);
-#endif
-}