"Fossies" - the Fresh Open Source Software Archive

Member "nsd-4.3.7/compat/explicit_bzero.c" (22 Jul 2021, 417 Bytes) of package /linux/misc/dns/nsd-4.3.7.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /*  $OpenBSD: explicit_bzero.c,v 1.4 2015/08/31 02:53:57 guenther Exp $ */
    2 /*
    3  * Public domain.
    4  * Written by Matthew Dempsky.
    5  */
    6 #include "config.h"
    7 #include <string.h>
    8 
    9 #ifdef HAVE_ATTR_WEAK
   10 __attribute__((weak)) void
   11 #else
   12 void
   13 #endif
   14 __explicit_bzero_hook(void *ATTR_UNUSED(buf), size_t ATTR_UNUSED(len))
   15 {
   16 }
   17 
   18 void
   19 explicit_bzero(void *buf, size_t len)
   20 {
   21     memset(buf, 0, len);
   22     __explicit_bzero_hook(buf, len);
   23 }