Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 May 2017 06:00:14 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r319286 - stable/10/sys/libkern
Message-ID:  <201705310600.v4V60EAj052436@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Wed May 31 06:00:14 2017
New Revision: 319286
URL: https://svnweb.freebsd.org/changeset/base/319286

Log:
  MFC r311989 (cem):
  
  libkern: Remove obsolete 'register' keyword

Modified:
  stable/10/sys/libkern/bcmp.c
  stable/10/sys/libkern/bsearch.c
  stable/10/sys/libkern/iconv_ucs.c
  stable/10/sys/libkern/iconv_xlat16.c
  stable/10/sys/libkern/qdivrem.c
  stable/10/sys/libkern/qsort.c
  stable/10/sys/libkern/random.c
  stable/10/sys/libkern/scanc.c
  stable/10/sys/libkern/strcmp.c
  stable/10/sys/libkern/strncpy.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/libkern/bcmp.c
==============================================================================
--- stable/10/sys/libkern/bcmp.c	Wed May 31 05:52:32 2017	(r319285)
+++ stable/10/sys/libkern/bcmp.c	Wed May 31 06:00:14 2017	(r319286)
@@ -44,7 +44,7 @@ typedef const unsigned long	*culp;
 int
 bcmp(b1, b2, length)
 	const void *b1, *b2;
-	register size_t length;
+	size_t length;
 {
 #if BYTE_ORDER == LITTLE_ENDIAN
 	/*

Modified: stable/10/sys/libkern/bsearch.c
==============================================================================
--- stable/10/sys/libkern/bsearch.c	Wed May 31 05:52:32 2017	(r319285)
+++ stable/10/sys/libkern/bsearch.c	Wed May 31 06:00:14 2017	(r319286)
@@ -54,16 +54,16 @@ __FBSDID("$FreeBSD$");
  */
 void *
 bsearch(key, base0, nmemb, size, compar)
-	register const void *key;
+	const void *key;
 	const void *base0;
 	size_t nmemb;
-	register size_t size;
-	register int (*compar)(const void *, const void *);
+	size_t size;
+	int (*compar)(const void *, const void *);
 {
-	register const char *base = base0;
-	register size_t lim;
-	register int cmp;
-	register const void *p;
+	const char *base = base0;
+	size_t lim;
+	int cmp;
+	const void *p;
 
 	for (lim = nmemb; lim != 0; lim >>= 1) {
 		p = base + (lim >> 1) * size;

Modified: stable/10/sys/libkern/iconv_ucs.c
==============================================================================
--- stable/10/sys/libkern/iconv_ucs.c	Wed May 31 05:52:32 2017	(r319285)
+++ stable/10/sys/libkern/iconv_ucs.c	Wed May 31 06:00:14 2017	(r319286)
@@ -523,14 +523,14 @@ ucs4_to_utf8(uint32_t ucs4, char *dst, size_t *utf8wid
 }
 
 static uint32_t
-encode_surrogate(register uint32_t code)
+encode_surrogate(uint32_t code)
 {
 	return ((((code - 0x10000) << 6) & 0x3ff0000) |
 	    ((code - 0x10000) & 0x3ff) | 0xd800dc00);
 }
 
 static uint32_t
-decode_surrogate(register const u_char *ucs)
+decode_surrogate(const u_char *ucs)
 {
 	return ((((ucs[0] & 0x3) << 18) | (ucs[1] << 10) |
 	    ((ucs[2] & 0x3) << 8) | ucs[3]) + 0x10000);

Modified: stable/10/sys/libkern/iconv_xlat16.c
==============================================================================
--- stable/10/sys/libkern/iconv_xlat16.c	Wed May 31 05:52:32 2017	(r319285)
+++ stable/10/sys/libkern/iconv_xlat16.c	Wed May 31 06:00:14 2017	(r319286)
@@ -298,10 +298,10 @@ iconv_xlat16_name(struct iconv_converter_class *dcp)
 }
 
 static int
-iconv_xlat16_tolower(void *d2p, register int c)
+iconv_xlat16_tolower(void *d2p, int c)
 {
         struct iconv_xlat16 *dp = (struct iconv_xlat16*)d2p;
-	register int c1, c2, out;
+	int c1, c2, out;
 
 	if (c < 0x100) {
 		c1 = C2I1(c << 8);
@@ -323,10 +323,10 @@ iconv_xlat16_tolower(void *d2p, register int c)
 }
 
 static int
-iconv_xlat16_toupper(void *d2p, register int c)
+iconv_xlat16_toupper(void *d2p, int c)
 {
         struct iconv_xlat16 *dp = (struct iconv_xlat16*)d2p;
-	register int c1, c2, out;
+	int c1, c2, out;
 
 	if (c < 0x100) {
 		c1 = C2I1(c << 8);

Modified: stable/10/sys/libkern/qdivrem.c
==============================================================================
--- stable/10/sys/libkern/qdivrem.c	Wed May 31 05:52:32 2017	(r319285)
+++ stable/10/sys/libkern/qdivrem.c	Wed May 31 06:00:14 2017	(r319286)
@@ -59,9 +59,9 @@ typedef u_long digit;
  * We may assume len >= 0.  NOTE THAT THIS WRITES len+1 DIGITS.
  */
 static void
-__shl(register digit *p, register int len, register int sh)
+__shl(digit *p, int len, int sh)
 {
-	register int i;
+	int i;
 
 	for (i = 0; i < len; i++)
 		p[i] = LHALF(p[i] << sh) | (p[i + 1] >> (HALF_BITS - sh));
@@ -82,7 +82,7 @@ __qdivrem(uq, vq, arq)
 {
 	union uu tmp;
 	digit *u, *v, *q;
-	register digit v1, v2;
+	digit v1, v2;
 	u_long qhat, rhat, t;
 	int m, n, d, j, i;
 	digit uspace[5], vspace[5], qspace[5];
@@ -192,7 +192,7 @@ __qdivrem(uq, vq, arq)
 	v1 = v[1];	/* for D3 -- note that v[1..n] are constant */
 	v2 = v[2];	/* for D3 */
 	do {
-		register digit uj0, uj1, uj2;
+		digit uj0, uj1, uj2;
 
 		/*
 		 * D3: Calculate qhat (\^q, in TeX notation).

Modified: stable/10/sys/libkern/qsort.c
==============================================================================
--- stable/10/sys/libkern/qsort.c	Wed May 31 05:52:32 2017	(r319285)
+++ stable/10/sys/libkern/qsort.c	Wed May 31 06:00:14 2017	(r319286)
@@ -48,10 +48,10 @@ static __inline void	 swapfunc(char *, char *, int, in
  */
 #define swapcode(TYPE, parmi, parmj, n) { 		\
 	long i = (n) / sizeof (TYPE); 			\
-	register TYPE *pi = (TYPE *) (parmi); 		\
-	register TYPE *pj = (TYPE *) (parmj); 		\
+	TYPE *pi = (TYPE *) (parmi); 			\
+	TYPE *pj = (TYPE *) (parmj); 			\
 	do { 						\
-		register TYPE	t = *pi;		\
+		TYPE	t = *pi;			\
 		*pi++ = *pj;				\
 		*pj++ = t;				\
         } while (--i > 0);				\

Modified: stable/10/sys/libkern/random.c
==============================================================================
--- stable/10/sys/libkern/random.c	Wed May 31 05:52:32 2017	(r319285)
+++ stable/10/sys/libkern/random.c	Wed May 31 06:00:14 2017	(r319286)
@@ -57,7 +57,7 @@ srandom(seed)
 u_long
 random()
 {
-	register long x, hi, lo, t;
+	long x, hi, lo, t;
 
 	/*
 	 * Compute x[n + 1] = (7^5 * x[n]) mod (2^31 - 1).

Modified: stable/10/sys/libkern/scanc.c
==============================================================================
--- stable/10/sys/libkern/scanc.c	Wed May 31 05:52:32 2017	(r319285)
+++ stable/10/sys/libkern/scanc.c	Wed May 31 06:00:14 2017	(r319286)
@@ -37,11 +37,11 @@ __FBSDID("$FreeBSD$");
 int
 scanc(size, cp, table, mask0)
 	u_int size;
-	register const u_char *cp, table[];
+	const u_char *cp, table[];
 	int mask0;
 {
-	register const u_char *end;
-	register u_char mask;
+	const u_char *end;
+	u_char mask;
 
 	mask = mask0;
 	for (end = &cp[size]; cp < end; ++cp) {

Modified: stable/10/sys/libkern/strcmp.c
==============================================================================
--- stable/10/sys/libkern/strcmp.c	Wed May 31 05:52:32 2017	(r319285)
+++ stable/10/sys/libkern/strcmp.c	Wed May 31 06:00:14 2017	(r319286)
@@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$");
  */
 int
 strcmp(s1, s2)
-	register const char *s1, *s2;
+	const char *s1, *s2;
 {
 	while (*s1 == *s2++)
 		if (*s1++ == 0)

Modified: stable/10/sys/libkern/strncpy.c
==============================================================================
--- stable/10/sys/libkern/strncpy.c	Wed May 31 05:52:32 2017	(r319285)
+++ stable/10/sys/libkern/strncpy.c	Wed May 31 06:00:14 2017	(r319286)
@@ -43,8 +43,8 @@ char *
 strncpy(char * __restrict dst, const char * __restrict src, size_t n)
 {
 	if (n != 0) {
-		register char *d = dst;
-		register const char *s = src;
+		char *d = dst;
+		const char *s = src;
 
 		do {
 			if ((*d++ = *s++) == 0) {



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