diff options
Diffstat (limited to 'usr.bin/patch')
| -rw-r--r-- | usr.bin/patch/pch.c | 17 | ||||
| -rw-r--r-- | usr.bin/patch/util.c | 6 |
2 files changed, 9 insertions, 14 deletions
diff --git a/usr.bin/patch/pch.c b/usr.bin/patch/pch.c index 8a635ad89c9..b8f60baed35 100644 --- a/usr.bin/patch/pch.c +++ b/usr.bin/patch/pch.c @@ -1,7 +1,7 @@ /* * $OpenBSD: pch.c,v 1.37 2007/09/02 15:19:33 deraadt Exp $ * $DragonFly: src/usr.bin/patch/pch.c,v 1.6 2008/08/10 23:35:40 joerg Exp $ - * $NetBSD: pch.c,v 1.30 2018/06/18 18:33:31 christos Exp $ + * $NetBSD: pch.c,v 1.31 2020/11/17 20:49:12 rhialto Exp $ */ /* @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: pch.c,v 1.30 2018/06/18 18:33:31 christos Exp $"); +__RCSID("$NetBSD: pch.c,v 1.31 2020/11/17 20:49:12 rhialto Exp $"); #include <sys/types.h> #include <sys/stat.h> @@ -556,16 +556,11 @@ another_hunk(void) ret = pgets(buf, buf_len, pfp); p_input_line++; if (ret == NULL) { - if (p_max - p_end < 4) { - /* assume blank lines got chopped */ - strlcpy(buf, " \n", buf_len); - } else { - if (repl_beginning && repl_could_be_missing) { - repl_missing = true; - goto hunk_done; - } - fatal("unexpected end of file in patch\n"); + if (repl_beginning && repl_could_be_missing) { + repl_missing = true; + goto hunk_done; } + fatal("unexpected end of file in patch\n"); } p_end++; if (p_end >= hunkmax) diff --git a/usr.bin/patch/util.c b/usr.bin/patch/util.c index 30e4f3c5a07..af5a5e475f1 100644 --- a/usr.bin/patch/util.c +++ b/usr.bin/patch/util.c @@ -1,7 +1,7 @@ /* * $OpenBSD: util.c,v 1.32 2006/03/11 19:41:30 otto Exp $ * $DragonFly: src/usr.bin/patch/util.c,v 1.9 2007/09/29 23:11:10 swildner Exp $ - * $NetBSD: util.c,v 1.28 2018/06/18 18:33:31 christos Exp $ + * $NetBSD: util.c,v 1.29 2020/11/17 20:49:12 rhialto Exp $ */ /* @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: util.c,v 1.28 2018/06/18 18:33:31 christos Exp $"); +__RCSID("$NetBSD: util.c,v 1.29 2020/11/17 20:49:12 rhialto Exp $"); #include <sys/param.h> #include <sys/stat.h> @@ -417,7 +417,7 @@ checked_in(char *file) void version(void) { - printf("Patch version 2.0-12u8-NetBSD\n"); + printf("Patch version 2.0-12u9-NetBSD\n"); my_exit(EXIT_SUCCESS); } |
