bzero(3)

bzero3

Write zeroes to a byte string

Usage

#include <strings.h>

void

bzero(void *s, size_t n);

Library

Standard C Library (libc, -lc)

Overview

The bzero() function writes n zeroed bytes to the string s. If n is zero, bzero() does nothing.

Releases

163 releases since Mac OS X 10.0; the text changed 6 times.

  1. 10.0–10.1.5
  2. 10.2–10.2.8
  3. 10.3–10.3.9
  4. 10.4–10.4.11
  5. 10.5–10.6.8
  6. 10.7–10.8.5
  7. 10.9–26.5

History

A bzero() function appeared in 4.3BSD. Its prototype existed previously in ⟨string.h⟩ before it was moved to ⟨strings.h⟩ for IEEE Std 1003.1-2001 (“POSIX.1”) compliance.

bzero() was deprecated in IEEE Std 1003.1-2001 (“POSIX.1”) and removed in IEEE Std 1003.1-2008 (“POSIX.1”).

From Libc 1752.120.2 in macOS 26.5. Parsed by carta from the page's mdoc source.