Author: imp
Date: Wed Sep  9 22:42:14 2020
New Revision: 365535
URL: https://svnweb.freebsd.org/changeset/base/365535

Log:
  MFC r364291:
  r364291 | imp | 2020-08-16 17:55:23 -0600 (Sun, 16 Aug 2020) | 33 lines
  
  Remove heuristic for dealing with trailing newlines being truncated by 
mailers.
  ...

Modified:
  stable/12/usr.bin/patch/pch.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.bin/patch/pch.c
==============================================================================
--- stable/12/usr.bin/patch/pch.c       Wed Sep  9 22:40:39 2020        
(r365534)
+++ stable/12/usr.bin/patch/pch.c       Wed Sep  9 22:42:14 2020        
(r365535)
@@ -587,16 +587,11 @@ another_hunk(void)
                        len = pgets(true);
                        p_input_line++;
                        if (len == 0) {
-                               if (p_max - p_end < 4) {
-                                       /* assume blank lines got chopped */
-                                       strlcpy(buf, "  \n", buf_size);
-                               } 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)
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to