From owner-svn-src-head@freebsd.org Mon Sep 12 14:28:39 2016 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 8D620BD8710; Mon, 12 Sep 2016 14:28:39 +0000 (UTC) (envelope-from emaste@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 4482D418; Mon, 12 Sep 2016 14:28:39 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8CESceC042824; Mon, 12 Sep 2016 14:28:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8CEScb5042823; Mon, 12 Sep 2016 14:28:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201609121428.u8CEScb5042823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 12 Sep 2016 14:28:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305737 - head/usr.bin/bsdiff/bspatch 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: Mon, 12 Sep 2016 14:28:39 -0000 Author: emaste Date: Mon Sep 12 14:28:38 2016 New Revision: 305737 URL: https://svnweb.freebsd.org/changeset/base/305737 Log: bspatch: remove superfluous newlines from errx strings Modified: head/usr.bin/bsdiff/bspatch/bspatch.c Modified: head/usr.bin/bsdiff/bspatch/bspatch.c ============================================================================== --- head/usr.bin/bsdiff/bspatch/bspatch.c Mon Sep 12 10:23:24 2016 (r305736) +++ head/usr.bin/bsdiff/bspatch/bspatch.c Mon Sep 12 14:28:38 2016 (r305737) @@ -183,13 +183,13 @@ int main(int argc, char *argv[]) /* Read header */ if (fread(header, 1, 32, f) < 32) { if (feof(f)) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); err(1, "fread(%s)", argv[3]); } /* Check for appropriate magic */ if (memcmp(header, "BSDIFF40", 8) != 0) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); /* Read lengths from header */ bzctrllen = offtin(header + 8); @@ -198,7 +198,7 @@ int main(int argc, char *argv[]) if (bzctrllen < 0 || bzctrllen > OFF_MAX - 32 || bzdatalen < 0 || bzctrllen + 32 > OFF_MAX - bzdatalen || newsize < 0 || newsize > SSIZE_MAX) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); /* Close patch file and re-open it via libbzip2 at the right places */ if (fclose(f)) @@ -237,24 +237,24 @@ int main(int argc, char *argv[]) lenread = BZ2_bzRead(&cbz2err, cpfbz2, buf, 8); if ((lenread < 8) || ((cbz2err != BZ_OK) && (cbz2err != BZ_STREAM_END))) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); ctrl[i] = offtin(buf); } /* Sanity-check */ if (ctrl[0] < 0 || ctrl[0] > INT_MAX || ctrl[1] < 0 || ctrl[1] > INT_MAX) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); /* Sanity-check */ if (newpos + ctrl[0] > newsize) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); /* Read diff string */ lenread = BZ2_bzRead(&dbz2err, dpfbz2, new + newpos, ctrl[0]); if ((lenread < ctrl[0]) || ((dbz2err != BZ_OK) && (dbz2err != BZ_STREAM_END))) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); /* Add old data to diff string */ for (i = 0; i < ctrl[0]; i++) @@ -267,13 +267,13 @@ int main(int argc, char *argv[]) /* Sanity-check */ if (newpos + ctrl[1] > newsize) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); /* Read extra string */ lenread = BZ2_bzRead(&ebz2err, epfbz2, new + newpos, ctrl[1]); if ((lenread < ctrl[1]) || ((ebz2err != BZ_OK) && (ebz2err != BZ_STREAM_END))) - errx(1, "Corrupt patch\n"); + errx(1, "Corrupt patch"); /* Adjust pointers */ newpos+=ctrl[1];