diff options
author | imp <imp@FreeBSD.org> | 1997-03-28 15:24:41 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1997-03-28 15:24:41 +0000 |
commit | 054f35c2222ef251bc2877814cf7bf5ff6038166 (patch) | |
tree | bf569c1217b3803ad2d64ba6083e1610213c7ece /bin/ed | |
parent | 3ad19c4ae3d0f156867d86a310e2d6d0f40a7a51 (diff) | |
download | FreeBSD-src-054f35c2222ef251bc2877814cf7bf5ff6038166.zip FreeBSD-src-054f35c2222ef251bc2877814cf7bf5ff6038166.tar.gz |
compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
Diffstat (limited to 'bin/ed')
-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 22206ed..d17ab62 100644 --- a/bin/ed/main.c +++ b/bin/ed/main.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: main.c,v 1.9 1997/02/22 14:03:17 peter Exp $ */ #ifndef lint @@ -122,7 +122,7 @@ main(argc, argv) red = (n = strlen(argv[0])) > 2 && argv[0][n - 3] == 'r'; top: - while ((c = getopt(argc, argv, "p:sx")) != EOF) + while ((c = getopt(argc, argv, "p:sx")) != -1) switch(c) { case 'p': /* set prompt */ prompt = optarg; |