From 86e35671da8b1f5fcf0e2b200230dfb257985e75 Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Wed, 8 Jul 1998 04:36:38 +0000 Subject: use fprintf everytime for consitancy; help !ansi compilers as well --- usr.bin/readlink/readlink.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/readlink/readlink.c b/usr.bin/readlink/readlink.c index 603d4bb0bcb..3d965d09c68 100644 --- a/usr.bin/readlink/readlink.c +++ b/usr.bin/readlink/readlink.c @@ -1,5 +1,5 @@ /* - * $OpenBSD: readlink.c,v 1.14 1998/05/18 19:12:03 deraadt Exp $ + * $OpenBSD: readlink.c,v 1.15 1998/07/08 04:36:37 mickey Exp $ * * Copyright (c) 1997 * Kenneth Stailey (hereinafter referred to as the author) @@ -65,9 +65,12 @@ main(argc, argv) } n = strlen(argv[0]); - if (n > PATH_MAX - 1) - errx(1, "filename longer than PATH_MAX-1 (%d)\n", - PATH_MAX - 1); + if (n > PATH_MAX - 1) { + fprintf(stderr, + "readlink: filename longer than PATH_MAX-1 (%d)\n", + PATH_MAX - 1); + exit(1); + } if (fflag) realpath(argv[0], buf); -- cgit v1.2.3