Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/date Use strtol() to convert the -r parameter so we can ...



details:   https://anonhg.NetBSD.org/src/rev/172de01e943a
branches:  trunk
changeset: 498406:172de01e943a
user:      simonb <simonb%NetBSD.org@localhost>
date:      Mon Oct 23 02:43:52 2000 +0000

description:
Use strtol() to convert the -r parameter so we can use alternate bases
for that input.

diffstat:

 bin/date/date.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 0d6633de4873 -r 172de01e943a bin/date/date.c
--- a/bin/date/date.c   Mon Oct 23 01:50:37 2000 +0000
+++ b/bin/date/date.c   Mon Oct 23 02:43:52 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: date.c,v 1.31 2000/10/08 10:30:44 bjh21 Exp $  */
+/*     $NetBSD: date.c,v 1.32 2000/10/23 02:43:52 simonb Exp $ */
 
 /*
  * Copyright (c) 1985, 1987, 1988, 1993
@@ -44,7 +44,7 @@
 #if 0
 static char sccsid[] = "@(#)date.c     8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: date.c,v 1.31 2000/10/08 10:30:44 bjh21 Exp $");
+__RCSID("$NetBSD: date.c,v 1.32 2000/10/23 02:43:52 simonb Exp $");
 #endif
 #endif /* not lint */
 
@@ -93,7 +93,7 @@
                        break;
                case 'r':               /* user specified seconds */
                        rflag = 1;
-                       tval = atol(optarg);
+                       tval = strtol(optarg, NULL, 0);
                        break;
                case 'u':               /* do everything in UTC */
                        (void)putenv("TZ=UTC0");



Home | Main Index | Thread Index | Old Index