From 054f35c2222ef251bc2877814cf7bf5ff6038166 Mon Sep 17 00:00:00 2001 From: imp Date: Fri, 28 Mar 1997 15:24:41 +0000 Subject: compare return value from getopt against -1 rather than EOF, per the final posix standard on the topic. --- bin/date/date.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/date') diff --git a/bin/date/date.c b/bin/date/date.c index 815a304..4d7e74e 100644 --- a/bin/date/date.c +++ b/bin/date/date.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: date.c,v 1.10 1997/02/22 14:02:33 peter Exp $ */ #ifndef lint @@ -84,7 +84,7 @@ main(argc, argv) tz.tz_dsttime = tz.tz_minuteswest = 0; rflag = 0; set_timezone = 0; - while ((ch = getopt(argc, argv, "d:nr:ut:")) != EOF) + while ((ch = getopt(argc, argv, "d:nr:ut:")) != -1) switch((char)ch) { case 'd': /* daylight savings time */ tz.tz_dsttime = strtol(optarg, &endptr, 10) ? 1 : 0; -- cgit v1.1