From nobody Wed Dec 13 20:07:04 2023 X-Original-To: dev-commits-src-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 4Sr62d0ncfz54FsV; Wed, 13 Dec 2023 20:07:05 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Sr62c5nNbz4bqt; Wed, 13 Dec 2023 20:07:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702498024; 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=JsZdCTdzBiIAZ8fRWuNMgaB4jvx2TXcmCWjE2exkCoc=; b=kF87UnuHbMXfQSH6VGOdLJQnKg06Fb9/1tkWGZUtEt91xlPk5gQuGAhZlgx56NfHphDV67 HWLG46Yi/o9X7eb+uKy7FRKjgNczaLFrPCo3K/GAD3yxKaeAVJVhZB4JBgcqe1cfaq0ORI /gerAlRhhUQtoP8PIgprMDHYnj33pZOow9roEtEHDBmaWR2skZGxY5HZRbBCbbfgnqtdVR fBhFme9j8qK3ftZQJYYa3vn1Xcb1Nw65q1NrqqOOUteU2GL95i+RlnzB/uHTrJuCFeybKg 08pqFYj288qrf90FYqzdbQBJKF5a/GBnov7acD0GKg3v0iHmU9GM67tJGKOf7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702498024; a=rsa-sha256; cv=none; b=i2F1d6sdLiT8ziCRbdsyrhv+VjIb5VVQArPA8KneuN7kXZdXgJHEoGxXWcCtyhzxOCixGg HehlzNuy6OHBlJTIt3xDtbmKRvo8g3lrP/UAMzZ1fm7aLRtO/XdtPuAYOr/85Mkk1XH5Ji Yya0OTl8KKIlxi/kCkMIZGJb6z3oId+R0mG9FVvoPSZ6Y3qjK7U9J/hmMPXgEPp/gftOom V3Isjf/VmaMlvAP6abKEszTCyUKSDo16jsf2xGXlbWwpJ7ovNcrbPwSBjf/Us1s2Zmhx/t 7U7q3eOswP94Wbi/5GkG/R/ujMCoR4zJHJKw0gepOgsh23ZvmBJuXrDCbO0++w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702498024; 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=JsZdCTdzBiIAZ8fRWuNMgaB4jvx2TXcmCWjE2exkCoc=; b=x44jbcDni4DN/pCpztvENK4xq8j9KkyLmo4sWh7eEt5nhNeFHDd1Yb05HBtvG2AhetW80H nm49ucUZotQJL/2F99hcGf7qJrJp2e4lBpxDAgMxwiZsiioH47Zgz8VIJ/oCz3aNLR9f6A MBaw+TfJfZIVSWtZ6oWqXjllWGNW6FyafzA7gIVxX74KwYGKGpx3NbHYwDTZL34ZrPycdO dZFanWCl8Stwc+4OGuDmQW98DZ91ytQKIweQ82xu8QwMNYDi7FcTcjj1h0AtEJY+Pv5GHR 1ai8kFTUHsjPSEdgWCvk+nz6Wsp9IZTY3rZOxV3HWAA/u7KzSnxHn3RPSwYr7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sr62c4vHzz1Bxg; Wed, 13 Dec 2023 20:07:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BDK747u088180; Wed, 13 Dec 2023 20:07:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDK747m088177; Wed, 13 Dec 2023 20:07:04 GMT (envelope-from git) Date: Wed, 13 Dec 2023 20:07:04 GMT Message-Id: <202312132007.3BDK747m088177@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 6a2dd26311e3 - stable/14 - hesiod: Modernize. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6a2dd26311e3dc6bd33d7981f8ea6d08cfd5f88b Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=6a2dd26311e3dc6bd33d7981f8ea6d08cfd5f88b commit 6a2dd26311e3dc6bd33d7981f8ea6d08cfd5f88b Author: Dag-Erling Smørgrav AuthorDate: 2023-10-18 14:05:37 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-12-13 16:41:48 +0000 hesiod: Modernize. Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D42190 (cherry picked from commit 64fc8a936c868345a8f687fe2797474c5fcf35cb) --- lib/libc/net/hesiod.c | 42 +++++++++++++----------------------------- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/lib/libc/net/hesiod.c b/lib/libc/net/hesiod.c index 879f7ecf765e..edced0707fe0 100644 --- a/lib/libc/net/hesiod.c +++ b/lib/libc/net/hesiod.c @@ -79,8 +79,7 @@ static void translate_errors(void); * initialize a hesiod_p. */ int -hesiod_init(context) - void **context; +hesiod_init(void **context) { struct hesiod_p *ctx; const char *p, *configname; @@ -128,8 +127,7 @@ hesiod_init(context) * Deallocates the hesiod_p. */ void -hesiod_end(context) - void *context; +hesiod_end(void *context) { struct hesiod_p *ctx = (struct hesiod_p *) context; @@ -219,10 +217,7 @@ hesiod_to_bind(void *context, const char *name, const char *type) * by the resolver. */ char ** -hesiod_resolve(context, name, type) - void *context; - const char *name; - const char *type; +hesiod_resolve(void *context, const char *name, const char *type) { struct hesiod_p *ctx = (struct hesiod_p *) context; char *bindname, **retvec; @@ -241,9 +236,7 @@ hesiod_resolve(context, name, type) /*ARGSUSED*/ void -hesiod_free_list(context, list) - void *context; - char **list; +hesiod_free_list(void *context, char **list) { char **p; @@ -261,9 +254,7 @@ hesiod_free_list(context, list) * or ctx->rhs which need to be freed by the caller. */ static int -read_config_file(ctx, filename) - struct hesiod_p *ctx; - const char *filename; +read_config_file(struct hesiod_p *ctx, const char *filename) { char *key, *data, *p, **which; char buf[MAXDNAME + 7]; @@ -355,9 +346,7 @@ read_config_file(ctx, filename) * return a list of them. */ static char ** -get_txt_records(qclass, name) - int qclass; - const char *name; +get_txt_records(int qclass, const char *name) { HEADER *hp; unsigned char qbuf[PACKETSZ], abuf[MAX_HESRESP], *p, *eom, *eor; @@ -481,16 +470,14 @@ static void *context; static int errval = HES_ER_UNINIT; int -hes_init() +hes_init(void) { init_context(); return errval; } char * -hes_to_bind(name, type) - const char *name; - const char *type; +hes_to_bind(const char *name, const char *type) { static char *bindname; if (init_context() < 0) @@ -504,9 +491,7 @@ hes_to_bind(name, type) } char ** -hes_resolve(name, type) - const char *name; - const char *type; +hes_resolve(const char *name, const char *type) { static char **list; @@ -527,20 +512,19 @@ hes_resolve(name, type) } int -hes_error() +hes_error(void) { return errval; } void -hes_free(hp) - char **hp; +hes_free(char **hp) { hesiod_free_list(context, hp); } static int -init_context() +init_context(void) { if (!inited) { inited = 1; @@ -554,7 +538,7 @@ init_context() } static void -translate_errors() +translate_errors(void) { switch (errno) { case ENOENT: