From nobody Sat Nov 22 16:16:33 2025 X-Original-To: dev-commits-doc-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dDHJx2znJz6HP1N for ; Sat, 22 Nov 2025 16:16:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dDHJx2DpNz3NJk for ; Sat, 22 Nov 2025 16:16:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763828193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Li3RXy0mUO37jF2ynXX+1J55gSuz6LmwoH4EpvYBy1w=; b=aZrWnPqyahRL6Ap8Cso9O2KsnCDcyAchCjzkz/yZyK24EIp/2oIKwyykk5X8uUhT5A8bQG lLjUp1IWzzPnnQvYGqryWbJ6/msbTn01E2kr9jdpG/0PfiK20b7E1GK5MKT6KfnuvXeNtc WNauPJQj1GDKJSYJomh8Z9PkWb34KLZCeaPPcesGA5QdC28YHcN5nFumB4a1JrbXMp/e53 4med398WOgjvRirTbHdhmgksFfAVv3IOZ/+5jGywDI5s/ECHSsK5+1qgwlvLUBptRkUP+D YDKDWTChXLTpo8aQVzvhl+6z1DMq7VRRW0xko3XnnYMQcywd2Umdv+IUYVc8SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763828193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Li3RXy0mUO37jF2ynXX+1J55gSuz6LmwoH4EpvYBy1w=; b=x4NaCzq0405ns98J0T0IFFmsfxJyJXb0+utxSflAjUFRhT0c+UwgRys4jZaBxVkA2C9i41 rM07rRG6/CtenKzmrGywIMxalJ54wqkVKooFw8VvnYLTlMsb/3vTlkhJLXdTKPW0CNBjE0 zkgKCa/57iw3TnmK6sgqXDgXzHLiAaYSHhTx2TtWLSTHEPr8Wv+QhTI9vq3JGGzPP05EbB SmizqubNn6rgljJ4sNcR6QDvVxr2LKb6s6qoGV0P8WCzgZECgTaMDyALSfEGJfQTx4J1Ad d4i9AB7qVU/4WZo97geu7GT+oxMLQGF8XiDwOSvu2sXGY60z/fIMurUcOfOCRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763828193; a=rsa-sha256; cv=none; b=HUn9Lm90nN6VhNa4njbcJlZU93TwcqfeOltyOl3MwQLtQ+GP6W9f60A6cH8pld3f2dXs6F y4W83PKB9tImsy8e6cJkaG07lW+uDGWaeOpuDODJ9Vy0WwNg/5iFbz/0TIPoP2z708qhwc oPq8AQS+hhWZWjg3nXRpS53KR/Rd/iAx4EkH+ZLCStc8x3HcC+722p3ZFsC/iMgJ2BoslY 9p8PR73DFLlFzwbZpHdBpk0Y8D/2uQw9qc9h3hNjzZmKYkoVXm6tk+OUowDSTsXeJri2tC 7JPF5joLGr7rs3ss748jMMkJcTiUWNcsyWMItkiyZyP2UihSD0IUCQOHyVfhCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dDHJx1fVvz15Jn for ; Sat, 22 Nov 2025 16:16:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a20c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 22 Nov 2025 16:16:33 +0000 To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Jose Luis Duran Subject: git: 0ecd8c6ee2 - main - handbook/sockets: Update a stray bzero() comment List-Id: Commit messages for all branches of the doc repository List-Archive: https://lists.freebsd.org/archives/dev-commits-doc-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-doc-all@freebsd.org Sender: owner-dev-commits-doc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ecd8c6ee2da3192e0aec89bc049011b6f1c575c Auto-Submitted: auto-generated Date: Sat, 22 Nov 2025 16:16:33 +0000 Message-Id: <6921e1e1.3a20c.12f6fe92@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/doc/commit/?id=0ecd8c6ee2da3192e0aec89bc049011b6f1c575c commit 0ecd8c6ee2da3192e0aec89bc049011b6f1c575c Author: Jose Luis Duran AuthorDate: 2025-10-30 18:00:46 +0000 Commit: Jose Luis Duran CommitDate: 2025-11-22 16:09:57 +0000 handbook/sockets: Update a stray bzero() comment The example was changed to use memset() instead of bzero(). Update the text accordingly. Reviewed by: ziaee Fixes: 920aa82eb1 ("sockets(examples): remove unused register, replace bzero with memset") Pull Request: https://github.com/freebsd/freebsd-doc/pull/563 --- documentation/content/en/books/developers-handbook/sockets/_index.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/content/en/books/developers-handbook/sockets/_index.adoc b/documentation/content/en/books/developers-handbook/sockets/_index.adoc index a85deb7394..95c8b7b814 100644 --- a/documentation/content/en/books/developers-handbook/sockets/_index.adoc +++ b/documentation/content/en/books/developers-handbook/sockets/_index.adoc @@ -799,7 +799,7 @@ if (INADDR_ANY) .... Its value is `0`. -Since we have just used `bzero` on the entire structure, it would be redundant to set it to `0` again. +Since we have just used `memset` to set zeroes on the entire structure, it would be redundant to set it to `0` again. But if we port our code to some other system where INADDR_ANY is perhaps not a zero, we need to assign it to `sa.sin_addr.s_addr`. Most modern C compilers are clever enough to notice that INADDR_ANY is a constant. As long as it is a zero, they will optimize the entire conditional statement out of the code.