Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Aug 2014 03:44:30 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r269901 - head/lib/libc/stdlib
Message-ID:  <201408130344.s7D3iUTL055823@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Wed Aug 13 03:44:30 2014
New Revision: 269901
URL: http://svnweb.freebsd.org/changeset/base/269901

Log:
  Minor style tweaks.
  
  Obtained from:	OpenBSD (CVS rev. 1.7)
  MFC after:	3 days

Modified:
  head/lib/libc/stdlib/strtonum.c

Modified: head/lib/libc/stdlib/strtonum.c
==============================================================================
--- head/lib/libc/stdlib/strtonum.c	Wed Aug 13 01:43:38 2014	(r269900)
+++ head/lib/libc/stdlib/strtonum.c	Wed Aug 13 03:44:30 2014	(r269901)
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- *	$OpenBSD: strtonum.c,v 1.6 2004/08/03 19:38:01 millert Exp $
+ *	$OpenBSD: strtonum.c,v 1.7 2013/04/17 18:40:58 tedu Exp $
  */
 
 #include <sys/cdefs.h>
@@ -24,17 +24,17 @@ __FBSDID("$FreeBSD$");
 #include <limits.h>
 #include <stdlib.h>
 
-#define INVALID 	1
-#define TOOSMALL 	2
-#define TOOLARGE 	3
+#define	INVALID		1
+#define	TOOSMALL	2
+#define	TOOLARGE	3
 
 long long
 strtonum(const char *numstr, long long minval, long long maxval,
     const char **errstrp)
 {
 	long long ll = 0;
-	char *ep;
 	int error = 0;
+	char *ep;
 	struct errval {
 		const char *errstr;
 		int err;
@@ -47,9 +47,9 @@ strtonum(const char *numstr, long long m
 
 	ev[0].err = errno;
 	errno = 0;
-	if (minval > maxval)
+	if (minval > maxval) {
 		error = INVALID;
-	else {
+	} else {
 		ll = strtoll(numstr, &ep, 10);
 		if (errno == EINVAL || numstr == ep || *ep != '\0')
 			error = INVALID;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408130344.s7D3iUTL055823>