Date: Mon, 12 Sep 2016 14:28:38 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305737 - head/usr.bin/bsdiff/bspatch Message-ID: <201609121428.u8CEScb5042823@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609121428.u8CEScb5042823>