From 7988e233ddef06f8cbbc91fad70f9e9ee0a4da08 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sat, 21 May 2022 01:21:30 +0000 Subject: repair a few more backwards compares that create headaches ok millert --- usr.sbin/cron/misc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.sbin/cron/misc.c') diff --git a/usr.sbin/cron/misc.c b/usr.sbin/cron/misc.c index 8e0865d0a85..b825d5b1be7 100644 --- a/usr.sbin/cron/misc.c +++ b/usr.sbin/cron/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.71 2015/11/14 13:09:14 millert Exp $ */ +/* $OpenBSD: misc.c,v 1.72 2022/05/21 01:21:29 deraadt Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") @@ -67,7 +67,7 @@ get_string(char *string, int size, FILE *file, char *terms) { int ch; - while (EOF != (ch = get_char(file)) && !strchr(terms, ch)) { + while ((ch = get_char(file)) != EOF && !strchr(terms, ch)) { if (size > 1) { *string++ = ch; size--; @@ -87,7 +87,7 @@ skip_comments(FILE *file) { int ch; - while (EOF != (ch = get_char(file))) { + while ((ch = get_char(file)) != EOF) { /* ch is now the first character of a line. */ -- cgit v1.2.3