]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Move fortified explicit_bzero back to string3
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 6 Jan 2017 13:05:27 +0000 (11:05 -0200)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 9 Jan 2017 15:48:44 +0000 (13:48 -0200)
Commit 38765ab68f329fd moved the bzero, bcopy, and explicit_bzero
fortified macros to a common header (strings_fortified.h).  However
the side effect is a fortified explicit_bzero is defined when including
only strings.h.

This patch moves back the fortified explicit_bzero definition to
strings3.h header.

Checked on x86_64-linux-gnu.

* string/bits/strings_fortified.h (explicit_bzero): Move back to ..
* string/bits/string3.h: ... here.

ChangeLog
string/bits/string3.h
string/bits/strings_fortified.h

index 172b0c9275403467d0e1d74024321b3ee13c68cf..8454cd627e4bb400fa756692b3446e0bf4e44610 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-01-09  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+       * string/bits/strings_fortified.h (explicit_bzero): Move back to ..
+       * string/bits/string3.h: ... here.
+
 2017-01-05  Joseph Myers  <joseph@codesourcery.com>
 
        [BZ #21028]
index 0b0a37744abee5abb1a6810cfdbd976c64c106b9..738226d49b8c477eb147e0fbbc0419fab8ab208e 100644 (file)
@@ -92,6 +92,15 @@ __NTH (memset (void *__dest, int __ch, size_t __len))
 
 #ifdef __USE_MISC
 # include <bits/strings_fortified.h>
+
+void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
+  __THROW __nonnull ((1));
+
+__fortify_function void
+__NTH (explicit_bzero (void *__dest, size_t __len))
+{
+  __explicit_bzero_chk (__dest, __len, __bos0 (__dest));
+}
 #endif
 
 __fortify_function char *
index fd396f9f3c19acdb64a6d8f1a369f2e6127c28cf..411e7863d6ff97929f6b3476c3dc75fba0176134 100644 (file)
@@ -31,13 +31,4 @@ __NTH (bzero (void *__dest, size_t __len))
   (void) __builtin___memset_chk (__dest, '\0', __len, __bos0 (__dest));
 }
 
-void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
-  __THROW __nonnull ((1));
-
-__fortify_function void
-__NTH (explicit_bzero (void *__dest, size_t __len))
-{
-  __explicit_bzero_chk (__dest, __len, __bos0 (__dest));
-}
-
 #endif