aboutsummaryrefslogtreecommitdiff
path: root/contrib/csup/diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/csup/diff.c')
-rw-r--r--contrib/csup/diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/csup/diff.c b/contrib/csup/diff.c
index 9a0f5fe924fb..805967689985 100644
--- a/contrib/csup/diff.c
+++ b/contrib/csup/diff.c
@@ -140,10 +140,10 @@ diff_apply(struct stream *rd, struct stream *orig, struct stream *dest,
}
line = stream_getln(rd, NULL);
}
- if (line == NULL)
+ if (comode && line == NULL)
return (-1);
/* If we got ".+", there's no ending newline. */
- if (strcmp(line, ".+") == 0 && !empty)
+ if (comode && strcmp(line, ".+") == 0 && !empty)
noeol = 1;
ec.where = 0;
while ((line = stream_getln(orig, &size)) != NULL)