summaryrefslogtreecommitdiffstats
path: root/bin/date/date.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1997-03-28 15:24:41 +0000
committerimp <imp@FreeBSD.org>1997-03-28 15:24:41 +0000
commit054f35c2222ef251bc2877814cf7bf5ff6038166 (patch)
treebf569c1217b3803ad2d64ba6083e1610213c7ece /bin/date/date.c
parent3ad19c4ae3d0f156867d86a310e2d6d0f40a7a51 (diff)
downloadFreeBSD-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/date/date.c')
-rw-r--r--bin/date/date.c4
1 files changed, 2 insertions, 2 deletions
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;
OpenPOWER on IntegriCloud