Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/head Just ignore the errno of strtoimax, it doesn't ...



details:   https://anonhg.NetBSD.org/src/rev/47342f6ac8f7
branches:  trunk
changeset: 753540:47342f6ac8f7
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed Mar 31 21:55:23 2010 +0000

description:
Just ignore the errno of strtoimax, it doesn't provide much value.

diffstat:

 usr.bin/head/head.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 30cc9030789e -r 47342f6ac8f7 usr.bin/head/head.c
--- a/usr.bin/head/head.c       Wed Mar 31 21:52:11 2010 +0000
+++ b/usr.bin/head/head.c       Wed Mar 31 21:55:23 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: head.c,v 1.22 2010/03/31 21:52:11 joerg Exp $  */
+/*     $NetBSD: head.c,v 1.23 2010/03/31 21:55:23 joerg Exp $  */
 
 /*
  * Copyright (c) 1980, 1987, 1992, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)head.c     8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: head.c,v 1.22 2010/03/31 21:52:11 joerg Exp $");
+__RCSID("$NetBSD: head.c,v 1.23 2010/03/31 21:55:23 joerg Exp $");
 #endif
 #endif /* not lint */
 
@@ -91,7 +91,7 @@
                        bytecnt = strtoimax(optarg, &ep, 10);
                        if ((bytecnt == INTMAX_MAX && errno == ERANGE) ||
                            *ep || bytecnt <= 0)
-                               err(1, "illegal byte count -- %s", optarg);
+                               errx(1, "illegal byte count -- %s", optarg);
                        break;
 
                case 'n':
@@ -99,7 +99,7 @@
                        linecnt = strtoimax(optarg, &ep, 10);
                        if ((linecnt == INTMAX_MAX && errno == ERANGE) ||
                            *ep || linecnt <= 0)
-                               err(1, "illegal line count -- %s", optarg);
+                               errx(1, "illegal line count -- %s", optarg);
                        break;
 
                case 'q':



Home | Main Index | Thread Index | Old Index