From nobody Wed Oct 09 12:11:53 2024 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 4XNsFP4jmPz5YT5g; Wed, 09 Oct 2024 12:11:53 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XNsFP4H83z4VBj; Wed, 9 Oct 2024 12:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728475913; 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=EYqisZto1P2PzsQ2iiwY6eQpHMjubhxC6Q0NseYC/sg=; b=ETpSSxHyzBQBVeMKxjHaFloDFvi980ceGnUlz1RwSL24194i2VX5nRvb9xhpeud6x+06JB Cdw0T1Cfrac6y8SOH/gl/A3wPz8RnCyqOGyfNP8w1zekHnfn7DbPePS8FCjiTDgOB4I93O e+UVFzlGJWd/j7ABmWr7bgpYDRy4Yz1aEdMilAcDNxONffw7Fbw+RW7C6DgQm26KUaMeIR 7bxFAdTO/sHd0NJirlFBP9doPdaNV1Tar0zpTu95Wm2l1a1JJj4N9R0Mgg37/KqHBlSUCu VipVUsKJtVKvb7QqnXntazjnRLW9BTXf3VJLSU80fhv9x6dsUlCFCTLQESHHDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728475913; 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=EYqisZto1P2PzsQ2iiwY6eQpHMjubhxC6Q0NseYC/sg=; b=QirIKxNQIwm2B2k9DiMeN207FZZ8xTrQhLCqqVHh/oebhs/YTVSqgF+453H+DWsX2izB+z geGnXj3m2nySg+r47KNzEMqoEYPjxyaPlRnKYW228dXeSGisQmzxv2ZGz0D/F9PANJOoge hseAC3MxjCtwFHmmlNmY2OT0bjXM9wvugGD7dtWvWN+jcp6QDvV3+ytPLclgaBMDFJM7Lb Tv3H8BTGBnrs4z+r6YnW09PuHQoEwBaznrd0+RbkEIs2AhLIl1clPiV9nw1C2ori4XvmY1 8OL7LH+aVot4ws78bjw8ysffgx2gNcqox+oqgK01GCelJ2Y1lgD3hZlziH7OnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728475913; a=rsa-sha256; cv=none; b=XkNKgLwi3uVPmquXy5iLT9MwDFKq8SJP21Q1VFMThNHY/CsvqX3VG9LmL8Eyv3K1+yfkDo c4rYBqkjb4CDJ7HFacwz8LYQsi7hBJ2P4bzFZr65An8YuIroJGwwuCd3jXe3I+vSDf/xCg qbeH03YsaPlFByIPlrwuGn3tlWDLZoS2RSDepTxemsZrTTxDtZi3Fv+v+TYHBIsfc2QPmk 3+/D5PKeUSpIhpzs0IGZVrN5hr/y+LHInNlj3/W2QBcmM83QrVw9pNG+kmDZN7qw7uS3CR gmbqhtzdwUxN4xz5VmYcaaH3W5fbi0djPoo13xo/P9fjR3MwfwqJeIvD0vSOkQ== 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 4XNsFP3tRPz1CwQ; Wed, 9 Oct 2024 12:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 499CBrg2018376; Wed, 9 Oct 2024 12:11:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 499CBrw1018373; Wed, 9 Oct 2024 12:11:53 GMT (envelope-from git) Date: Wed, 9 Oct 2024 12:11:53 GMT Message-Id: <202410091211.499CBrw1018373@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: d350e8d795d5 - main - cmp: Style and type issues. 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d350e8d795d53dbc58ea428f76355cf5e28f6116 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d350e8d795d53dbc58ea428f76355cf5e28f6116 commit d350e8d795d53dbc58ea428f76355cf5e28f6116 Author: Dag-Erling Smørgrav AuthorDate: 2024-10-09 12:08:42 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-10-09 12:11:42 +0000 cmp: Style and type issues. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: 0mp, markj Differential Revision: https://reviews.freebsd.org/D47019 --- usr.bin/cmp/cmp.c | 4 ++-- usr.bin/cmp/link.c | 4 +++- usr.bin/cmp/regular.c | 1 + usr.bin/cmp/special.c | 1 + usr.bin/cmp/tests/cmp_test2.sh | 16 ++++++++-------- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/usr.bin/cmp/cmp.c b/usr.bin/cmp/cmp.c index c22e4d4121ac..01750aa66da7 100644 --- a/usr.bin/cmp/cmp.c +++ b/usr.bin/cmp/cmp.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -66,7 +67,6 @@ volatile sig_atomic_t info; static void siginfo(int signo) { - info = signo; } #endif @@ -244,7 +244,7 @@ main(int argc, char *argv[]) else { if (zflag && sb1.st_size != sb2.st_size) { if (!sflag) - (void) printf("%s %s differ: size\n", + (void)printf("%s %s differ: size\n", file1, file2); exit(DIFF_EXIT); } diff --git a/usr.bin/cmp/link.c b/usr.bin/cmp/link.c index 33b0fa46458c..a08f4dcf9973 100644 --- a/usr.bin/cmp/link.c +++ b/usr.bin/cmp/link.c @@ -27,6 +27,7 @@ */ #include + #include #include #include @@ -42,7 +43,8 @@ c_link(const char *file1, off_t skip1, const char *file2, off_t skip2, { char buf1[PATH_MAX], *p1; char buf2[PATH_MAX], *p2; - int dfound, len1, len2; + ssize_t len1, len2; + int dfound; off_t byte; u_char ch; diff --git a/usr.bin/cmp/regular.c b/usr.bin/cmp/regular.c index 0b78b83968c7..9e1db2bd8772 100644 --- a/usr.bin/cmp/regular.c +++ b/usr.bin/cmp/regular.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/usr.bin/cmp/special.c b/usr.bin/cmp/special.c index f29d3b454f64..47082eb276ab 100644 --- a/usr.bin/cmp/special.c +++ b/usr.bin/cmp/special.c @@ -33,6 +33,7 @@ #include #include +#include #include #include diff --git a/usr.bin/cmp/tests/cmp_test2.sh b/usr.bin/cmp/tests/cmp_test2.sh index ca4f6d7cf848..80d2e663875f 100755 --- a/usr.bin/cmp/tests/cmp_test2.sh +++ b/usr.bin/cmp/tests/cmp_test2.sh @@ -31,12 +31,12 @@ special_head() { special_body() { echo 0123456789abcdef > a echo 0123456789abcdeg > b - atf_check -s exit:0 -o empty -e empty -x "cat a | cmp a -" - atf_check -s exit:0 -o empty -e empty -x "cat a | cmp - a" - atf_check -s exit:1 -o not-empty -e empty -x "cat b | cmp a -" - atf_check -s exit:1 -o not-empty -e empty -x "cat b | cmp - a" + atf_check -s exit:0 -o empty -e empty cmp a -