From nobody Tue Jan 27 18:44:09 2026 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 4f0vSp6bLHz6QFnC for ; Tue, 27 Jan 2026 18:44:10 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4f0vSp06hSz3r1q for ; Tue, 27 Jan 2026 18:44:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1769539450; 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=/03lgcVGyQutNQ0n/UjewFEAc4yRpHJ1rejN433iiMM=; b=sUebAuCKmB9ZnfFCdQkruta7DQZhG83qs/qVsSGBHd5Xn0aNgQ6VZpWgEkvyf8oXMVkfPa 7aIIRsZp0cUO3ugvel5LUqYHrg2zYBj+G9GW9EP7NrjoylsN9u9BAXF+wH0Z1d+qnXHNmn 6K8nHlhz0AyASPcF251xZW9teC09Lrj7lhhdTrg1tpYIFi259tC7Ce6G70jk9raYIXaVVn KKbSXVfFUSFsiex0WgTQlC9+uSEp7/jKnJLfiyDOvoqpnfy0+PeS0gfH7lnqLHbl5lF91g EY0XAPpWxs+b79EoQn+lyqTHlRrByylj7yDtPHJQdY1LUYZlv/LQa/1atgIUtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1769539450; 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=/03lgcVGyQutNQ0n/UjewFEAc4yRpHJ1rejN433iiMM=; b=Gm5Sf14MlB1SIziscrIQqwB2iq+xhnjObyiZyDHz08Dm1lb3QVYtKZvWK0JuTw6pvgfwqQ MUfRc1+/VrIQiT92oLHnd1Eo4y/Sea2B3kS2TqCkl8Resvjcsxza3bm2ohvYeac3tZeaHk KULW7lK56ygza1uywlOPmybd3mr2z73hAT35j2qNzsVEec+4XSLBFvoKbUla4ke2Q1DS3a 8Uolqzz+FJW5zPTB3ZsT9XEBWC5ktlyHvi4iRWc22Kk1IwUN4t+EME8tNUlOwYPfWvhIbD 7xOxYHRFhE5gq16v+eIu+D8X5remQVeefiWJUJ77NAtV7qKN2kKqsCQBUjv58A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1769539450; a=rsa-sha256; cv=none; b=ENaGVDbFlZb8YXt1I2jqtSj0o+5jI0Wmuv/YRgSjnR2B5ifjmg8o7Y0GCjzS3gf0FpzIWm gAOnRzdZ1+W3KeDYuzXNS5YPO+8/XjtMHxWzSS8jZB0IIFLRHgK09agQ8IG8ZDUVdwfmy7 2SU3MvwrzAMUeMjAVhkIzgs4T2lDwyfLaRHnNaz4jztdFMwPkxMnnay4K9kP0nHjmjW82K Wbb+tWrkEilnB+tFsTw5WrmNN6tlryedTRvDjFTwciN6LxGpWKFdveIxGOGNjPRIGEamED 4XgixYNp7YxJ+e5381ALL2zHsgKR+pBzwH9bHKIEaztJPI5WhDZLMSnRWPNHhw== 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 4f0vSn6cqYz377 for ; Tue, 27 Jan 2026 18:44:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2003b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 27 Jan 2026 18:44:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: e7b94c2f3fa2 - stable/14 - ctld: Use preferred style for evaluating result of strcmp 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e7b94c2f3fa2cd5813f72cb553b54bb98b828306 Auto-Submitted: auto-generated Date: Tue, 27 Jan 2026 18:44:09 +0000 Message-Id: <69790779.2003b.7a5f9202@gitrepo.freebsd.org> The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e7b94c2f3fa2cd5813f72cb553b54bb98b828306 commit e7b94c2f3fa2cd5813f72cb553b54bb98b828306 Author: John Baldwin AuthorDate: 2025-02-12 19:27:30 +0000 Commit: John Baldwin CommitDate: 2026-01-27 18:15:56 +0000 ctld: Use preferred style for evaluating result of strcmp Reviewed by: asomers Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D48932 (cherry picked from commit 79a4240b135952cb318adf216a9e5d3ccbd6e343) --- usr.sbin/ctld/uclparse.c | 86 ++++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/usr.sbin/ctld/uclparse.c b/usr.sbin/ctld/uclparse.c index 8654004d009e..b782779f4d0e 100644 --- a/usr.sbin/ctld/uclparse.c +++ b/usr.sbin/ctld/uclparse.c @@ -253,7 +253,7 @@ uclparse_toplevel(const ucl_object_t *top) while ((obj = ucl_iterate_object(top, &it, true))) { const char *key = ucl_object_key(obj); - if (!strcmp(key, "debug")) { + if (strcmp(key, "debug") == 0) { if (obj->type == UCL_INT) conf->conf_debug = ucl_object_toint(obj); else { @@ -262,7 +262,7 @@ uclparse_toplevel(const ucl_object_t *top) } } - if (!strcmp(key, "timeout")) { + if (strcmp(key, "timeout") == 0) { if (obj->type == UCL_INT) conf->conf_timeout = ucl_object_toint(obj); else { @@ -271,7 +271,7 @@ uclparse_toplevel(const ucl_object_t *top) } } - if (!strcmp(key, "maxproc")) { + if (strcmp(key, "maxproc") == 0) { if (obj->type == UCL_INT) conf->conf_maxproc = ucl_object_toint(obj); else { @@ -280,7 +280,7 @@ uclparse_toplevel(const ucl_object_t *top) } } - if (!strcmp(key, "pidfile")) { + if (strcmp(key, "pidfile") == 0) { if (obj->type == UCL_STRING) conf->conf_pidfile_path = strdup( ucl_object_tostring(obj)); @@ -290,7 +290,7 @@ uclparse_toplevel(const ucl_object_t *top) } } - if (!strcmp(key, "isns-server")) { + if (strcmp(key, "isns-server") == 0) { if (obj->type == UCL_ARRAY) { iter = NULL; while ((child = ucl_iterate_object(obj, &iter, @@ -309,7 +309,7 @@ uclparse_toplevel(const ucl_object_t *top) } } - if (!strcmp(key, "isns-period")) { + if (strcmp(key, "isns-period") == 0) { if (obj->type == UCL_INT) conf->conf_isns_period = ucl_object_toint(obj); else { @@ -318,7 +318,7 @@ uclparse_toplevel(const ucl_object_t *top) } } - if (!strcmp(key, "isns-timeout")) { + if (strcmp(key, "isns-timeout") == 0) { if (obj->type == UCL_INT) conf->conf_isns_timeout = ucl_object_toint(obj); else { @@ -327,7 +327,7 @@ uclparse_toplevel(const ucl_object_t *top) } } - if (!strcmp(key, "auth-group")) { + if (strcmp(key, "auth-group") == 0) { if (obj->type == UCL_OBJECT) { iter = NULL; while ((child = ucl_iterate_object(obj, &iter, true))) { @@ -339,7 +339,7 @@ uclparse_toplevel(const ucl_object_t *top) } } - if (!strcmp(key, "portal-group")) { + if (strcmp(key, "portal-group") == 0) { if (obj->type == UCL_OBJECT) { iter = NULL; while ((child = ucl_iterate_object(obj, &iter, true))) { @@ -351,7 +351,7 @@ uclparse_toplevel(const ucl_object_t *top) } } - if (!strcmp(key, "lun")) { + if (strcmp(key, "lun") == 0) { if (obj->type == UCL_OBJECT) { iter = NULL; while ((child = ucl_iterate_object(obj, &iter, true))) { @@ -369,7 +369,7 @@ uclparse_toplevel(const ucl_object_t *top) while ((obj = ucl_iterate_object(top, &it, true))) { const char *key = ucl_object_key(obj); - if (!strcmp(key, "target")) { + if (strcmp(key, "target") == 0) { if (obj->type == UCL_OBJECT) { iter = NULL; while ((child = ucl_iterate_object(obj, &iter, @@ -397,7 +397,7 @@ uclparse_auth_group(const char *name, const ucl_object_t *top) const ucl_object_t *obj = NULL, *tmp = NULL; const char *key; - if (!strcmp(name, "default") && + if (strcmp(name, "default") == 0 && conf->conf_default_ag_defined == false) { auth_group = auth_group_find(conf, name); conf->conf_default_ag_defined = true; @@ -411,14 +411,14 @@ uclparse_auth_group(const char *name, const ucl_object_t *top) while ((obj = ucl_iterate_object(top, &it, true))) { key = ucl_object_key(obj); - if (!strcmp(key, "auth-type")) { + if (strcmp(key, "auth-type") == 0) { const char *value = ucl_object_tostring(obj); if (!auth_group_set_type(auth_group, value)) return (false); } - if (!strcmp(key, "chap")) { + if (strcmp(key, "chap") == 0) { if (obj->type != UCL_ARRAY) { log_warnx("\"chap\" property of " "auth-group \"%s\" is not an array", @@ -433,7 +433,7 @@ uclparse_auth_group(const char *name, const ucl_object_t *top) } } - if (!strcmp(key, "chap-mutual")) { + if (strcmp(key, "chap-mutual") == 0) { if (obj->type != UCL_ARRAY) { log_warnx("\"chap-mutual\" property of " "auth-group \"%s\" is not an array", @@ -448,7 +448,7 @@ uclparse_auth_group(const char *name, const ucl_object_t *top) } } - if (!strcmp(key, "initiator-name")) { + if (strcmp(key, "initiator-name") == 0) { if (obj->type != UCL_ARRAY) { log_warnx("\"initiator-name\" property of " "auth-group \"%s\" is not an array", @@ -466,7 +466,7 @@ uclparse_auth_group(const char *name, const ucl_object_t *top) } } - if (!strcmp(key, "initiator-portal")) { + if (strcmp(key, "initiator-portal") == 0) { if (obj->type != UCL_ARRAY) { log_warnx("\"initiator-portal\" property of " "auth-group \"%s\" is not an array", @@ -597,7 +597,7 @@ uclparse_portal_group(const char *name, const ucl_object_t *top) while ((obj = ucl_iterate_object(top, &it, true))) { key = ucl_object_key(obj); - if (!strcmp(key, "discovery-auth-group")) { + if (strcmp(key, "discovery-auth-group") == 0) { portal_group->pg_discovery_auth_group = auth_group_find(conf, ucl_object_tostring(obj)); if (portal_group->pg_discovery_auth_group == NULL) { @@ -609,7 +609,7 @@ uclparse_portal_group(const char *name, const ucl_object_t *top) } } - if (!strcmp(key, "discovery-filter")) { + if (strcmp(key, "discovery-filter") == 0) { if (obj->type != UCL_STRING) { log_warnx("\"discovery-filter\" property of " "portal-group \"%s\" is not a string", @@ -622,7 +622,7 @@ uclparse_portal_group(const char *name, const ucl_object_t *top) return (false); } - if (!strcmp(key, "listen")) { + if (strcmp(key, "listen") == 0) { if (obj->type == UCL_STRING) { if (!portal_group_add_listen(portal_group, ucl_object_tostring(obj), false)) @@ -644,7 +644,7 @@ uclparse_portal_group(const char *name, const ucl_object_t *top) } } - if (!strcmp(key, "listen-iser")) { + if (strcmp(key, "listen-iser") == 0) { if (obj->type == UCL_STRING) { if (!portal_group_add_listen(portal_group, ucl_object_tostring(obj), true)) @@ -666,7 +666,7 @@ uclparse_portal_group(const char *name, const ucl_object_t *top) } } - if (!strcmp(key, "redirect")) { + if (strcmp(key, "redirect") == 0) { if (obj->type != UCL_STRING) { log_warnx("\"listen\" property of " "portal-group \"%s\" is not a string", @@ -679,7 +679,7 @@ uclparse_portal_group(const char *name, const ucl_object_t *top) return (false); } - if (!strcmp(key, "options")) { + if (strcmp(key, "options") == 0) { if (obj->type != UCL_OBJECT) { log_warnx("\"options\" property of portal group " "\"%s\" is not an object", portal_group->pg_name); @@ -695,12 +695,12 @@ uclparse_portal_group(const char *name, const ucl_object_t *top) } } - if (!strcmp(key, "dscp")) { + if (strcmp(key, "dscp") == 0) { if (!uclparse_dscp("portal", portal_group, obj)) return (false); } - if (!strcmp(key, "pcp")) { + if (strcmp(key, "pcp") == 0) { if (!uclparse_pcp("portal", portal_group, obj)) return (false); } @@ -724,7 +724,7 @@ uclparse_target(const char *name, const ucl_object_t *top) while ((obj = ucl_iterate_object(top, &it, true))) { key = ucl_object_key(obj); - if (!strcmp(key, "alias")) { + if (strcmp(key, "alias") == 0) { if (obj->type != UCL_STRING) { log_warnx("\"alias\" property of target " "\"%s\" is not a string", target->t_name); @@ -734,7 +734,7 @@ uclparse_target(const char *name, const ucl_object_t *top) target->t_alias = strdup(ucl_object_tostring(obj)); } - if (!strcmp(key, "auth-group")) { + if (strcmp(key, "auth-group") == 0) { const char *ag; if (target->t_auth_group != NULL) { @@ -762,7 +762,7 @@ uclparse_target(const char *name, const ucl_object_t *top) } } - if (!strcmp(key, "auth-type")) { + if (strcmp(key, "auth-type") == 0) { if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) { log_warnx("cannot use both auth-group and " @@ -782,7 +782,7 @@ uclparse_target(const char *name, const ucl_object_t *top) return (false); } - if (!strcmp(key, "chap")) { + if (strcmp(key, "chap") == 0) { if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) { log_warnx("cannot use both auth-group " @@ -801,12 +801,12 @@ uclparse_target(const char *name, const ucl_object_t *top) return (false); } - if (!strcmp(key, "chap-mutual")) { + if (strcmp(key, "chap-mutual") == 0) { if (!uclparse_chap_mutual(target->t_auth_group, obj)) return (false); } - if (!strcmp(key, "initiator-name")) { + if (strcmp(key, "initiator-name") == 0) { const struct auth_name *an; if (target->t_auth_group != NULL) { @@ -829,7 +829,7 @@ uclparse_target(const char *name, const ucl_object_t *top) return (false); } - if (!strcmp(key, "initiator-portal")) { + if (strcmp(key, "initiator-portal") == 0) { const struct auth_portal *ap; if (target->t_auth_group != NULL) { @@ -852,7 +852,7 @@ uclparse_target(const char *name, const ucl_object_t *top) return (false); } - if (!strcmp(key, "portal-group")) { + if (strcmp(key, "portal-group") == 0) { if (obj->type == UCL_OBJECT) { if (!uclparse_target_portal_group(target, obj)) return (false); @@ -868,14 +868,14 @@ uclparse_target(const char *name, const ucl_object_t *top) } } - if (!strcmp(key, "port")) { + if (strcmp(key, "port") == 0) { const char *value; value = ucl_object_tostring(obj); target->t_pport = strdup(value); } - if (!strcmp(key, "redirect")) { + if (strcmp(key, "redirect") == 0) { if (obj->type != UCL_STRING) { log_warnx("\"redirect\" property of target " "\"%s\" is not a string", target->t_name); @@ -887,7 +887,7 @@ uclparse_target(const char *name, const ucl_object_t *top) return (false); } - if (!strcmp(key, "lun")) { + if (strcmp(key, "lun") == 0) { while ((tmp = ucl_iterate_object(obj, &it2, true))) { if (!uclparse_target_lun(target, tmp)) return (false); @@ -913,7 +913,7 @@ uclparse_lun(const char *name, const ucl_object_t *top) while ((obj = ucl_iterate_object(top, &it, true))) { key = ucl_object_key(obj); - if (!strcmp(key, "backend")) { + if (strcmp(key, "backend") == 0) { if (obj->type != UCL_STRING) { log_warnx("\"backend\" property of lun " "\"%s\" is not a string", @@ -924,7 +924,7 @@ uclparse_lun(const char *name, const ucl_object_t *top) lun_set_backend(lun, ucl_object_tostring(obj)); } - if (!strcmp(key, "blocksize")) { + if (strcmp(key, "blocksize") == 0) { if (obj->type != UCL_INT) { log_warnx("\"blocksize\" property of lun " "\"%s\" is not an integer", lun->l_name); @@ -934,7 +934,7 @@ uclparse_lun(const char *name, const ucl_object_t *top) lun_set_blocksize(lun, ucl_object_toint(obj)); } - if (!strcmp(key, "device-id")) { + if (strcmp(key, "device-id") == 0) { if (obj->type != UCL_STRING) { log_warnx("\"device-id\" property of lun " "\"%s\" is not an integer", lun->l_name); @@ -944,7 +944,7 @@ uclparse_lun(const char *name, const ucl_object_t *top) lun_set_device_id(lun, ucl_object_tostring(obj)); } - if (!strcmp(key, "options")) { + if (strcmp(key, "options") == 0) { if (obj->type != UCL_OBJECT) { log_warnx("\"options\" property of lun " "\"%s\" is not an object", lun->l_name); @@ -960,7 +960,7 @@ uclparse_lun(const char *name, const ucl_object_t *top) } } - if (!strcmp(key, "path")) { + if (strcmp(key, "path") == 0) { if (obj->type != UCL_STRING) { log_warnx("\"path\" property of lun " "\"%s\" is not a string", lun->l_name); @@ -970,7 +970,7 @@ uclparse_lun(const char *name, const ucl_object_t *top) lun_set_path(lun, ucl_object_tostring(obj)); } - if (!strcmp(key, "serial")) { + if (strcmp(key, "serial") == 0) { if (obj->type != UCL_STRING) { log_warnx("\"serial\" property of lun " "\"%s\" is not a string", lun->l_name); @@ -980,7 +980,7 @@ uclparse_lun(const char *name, const ucl_object_t *top) lun_set_serial(lun, ucl_object_tostring(obj)); } - if (!strcmp(key, "size")) { + if (strcmp(key, "size") == 0) { if (obj->type != UCL_INT) { log_warnx("\"size\" property of lun " "\"%s\" is not an integer", lun->l_name);