From owner-svn-src-head@freebsd.org Fri Mar 10 06:23:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27F50D05035; Fri, 10 Mar 2017 06:23:17 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E36731FB1; Fri, 10 Mar 2017 06:23:16 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2A6NFrg086974; Fri, 10 Mar 2017 06:23:15 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2A6NFwm086973; Fri, 10 Mar 2017 06:23:15 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201703100623.v2A6NFwm086973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Fri, 10 Mar 2017 06:23:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314993 - head/usr.bin/uuencode X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Mar 2017 06:23:17 -0000 Author: araujo Date: Fri Mar 10 06:23:15 2017 New Revision: 314993 URL: https://svnweb.freebsd.org/changeset/base/314993 Log: Use nitems() from sys/param.h. Reviewed by: ngie MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9936 Modified: head/usr.bin/uuencode/uuencode.c Modified: head/usr.bin/uuencode/uuencode.c ============================================================================== --- head/usr.bin/uuencode/uuencode.c Fri Mar 10 06:18:27 2017 (r314992) +++ head/usr.bin/uuencode/uuencode.c Fri Mar 10 06:23:15 2017 (r314993) @@ -160,7 +160,7 @@ base64_encode(void) fprintf(output, "begin-base64 %o %s\n", mode, *av); while ((n = fread(buf, 1, sizeof(buf), stdin))) { ++sequence; - rv = b64_ntop(buf, n, buf2, (sizeof(buf2) / sizeof(buf2[0]))); + rv = b64_ntop(buf, n, buf2, nitems(buf2)); if (rv == -1) errx(1, "b64_ntop: error encoding base64"); fprintf(output, "%s%s", buf2, (sequence % GROUPS) ? "" : "\n");