svn commit: r216967 - head/usr.sbin/rtprio

Konstantin Belousov kib at FreeBSD.org
Tue Jan 4 17:27:18 UTC 2011


Author: kib
Date: Tue Jan  4 17:27:17 2011
New Revision: 216967
URL: http://svn.freebsd.org/changeset/base/216967

Log:
  Use errx() instead of err() in parseint. There is usually no interesting
  information in errno.
  
  Noted by:	Garrett Cooper <yanegomi gmail com>
  MFC after:	1 week

Modified:
  head/usr.sbin/rtprio/rtprio.c

Modified: head/usr.sbin/rtprio/rtprio.c
==============================================================================
--- head/usr.sbin/rtprio/rtprio.c	Tue Jan  4 17:18:53 2011	(r216966)
+++ head/usr.sbin/rtprio/rtprio.c	Tue Jan  4 17:27:17 2011	(r216967)
@@ -133,9 +133,9 @@ parseint(const char *str, const char *er
 	errno = 0;
 	res = strtol(str, &endp, 10);
 	if (errno != 0 || endp == str || *endp != '\0')
-		err(1, "%s must be a number", errname);
+		errx(1, "%s must be a number", errname);
 	if (res >= INT_MAX)
-		err(1, "Integer overflow parsing %s", errname);
+		errx(1, "Integer overflow parsing %s", errname);
 	return (res);
 }
 


More information about the svn-src-head mailing list