diff options
author | 2018-02-26 17:35:08 +0000 | |
---|---|---|
committer | 2018-02-26 17:35:08 +0000 | |
commit | 6aeae0a8cf68bcd82bc9436f7e8f3df63d63a669 (patch) | |
tree | bc2d7b0e2d5fab9d088b5b5f25ddd11ca504a9a0 | |
parent | In ssl.h rev. 1.143 2018/02/22 17:27:07, jsing@ provided (diff) | |
download | wireguard-openbsd-6aeae0a8cf68bcd82bc9436f7e8f3df63d63a669.tar.xz wireguard-openbsd-6aeae0a8cf68bcd82bc9436f7e8f3df63d63a669.zip |
Make ed(1) warn about modifications if 'r'ead in an empty file and
trying to quit.
Diff from Tim Chase
OK tb@ and millert@
-rw-r--r-- | bin/ed/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ed/main.c b/bin/ed/main.c index 3ddf399eee6..45688d316ab 100644 --- a/bin/ed/main.c +++ b/bin/ed/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.60 2017/04/26 21:25:43 naddy Exp $ */ +/* $OpenBSD: main.c,v 1.61 2018/02/26 17:35:08 martijn Exp $ */ /* $NetBSD: main.c,v 1.3 1995/03/21 09:04:44 cgd Exp $ */ /* main.c: This file contains the main control and user-interface routines @@ -723,7 +723,7 @@ exec_command(void) if ((addr = read_file(*fnp ? fnp : old_filename, second_addr)) < 0) return ERR; - else if (addr && addr != addr_last) + else if (addr) modified = 1; break; case 's': |