File: explicit_bzero.c

package info (click to toggle)
opendoas 6.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 308 kB
  • sloc: ansic: 2,427; sh: 386; yacc: 290; makefile: 11
file content (23 lines) | stat: -rw-r--r-- 413 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*	$OpenBSD: explicit_bzero.c,v 1.2 2014/06/10 04:17:37 deraadt Exp $ */
/*
 * Public domain.
 * Written by Matthew Dempsky.
 */

#include "config.h"

#include <string.h>

#define __UNUSED __attribute__ ((unused))

__attribute__((weak)) void
__explicit_bzero_hook(__UNUSED void *buf, __UNUSED size_t len)
{
}

void
explicit_bzero(void *buf, size_t len)
{
	memset(buf, 0, len);
	__explicit_bzero_hook(buf, len);
}