diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c index 756f07a..d14516e 100644 --- a/usr.bin/patch/patch.c +++ b/usr.bin/patch/patch.c @@ -394,12 +394,14 @@ main(int argc, char *argv[]) sizeof(rejname)) >= sizeof(rejname)) fatal("filename %s is too long\n", outname); } - if (skip_rest_of_patch) { - say("%d out of %d hunks ignored--saving rejects to %s\n", - failed, hunk, rejname); - } else { - say("%d out of %d hunks failed--saving rejects to %s\n", - failed, hunk, rejname); + if (check_only == false) { + if (skip_rest_of_patch) { + say("%d out of %d hunks ignored--saving rejects to %s\n", + failed, hunk, rejname); + } else { + say("%d out of %d hunks failed--saving rejects to %s\n", + failed, hunk, rejname); + } } if (!check_only && move_file(TMPREJNAME, rejname) < 0) trejkeep = true;