1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-25 11:37:56 +00:00

libkern: Remove obsolete 'register' keyword

Sponsored by:	Dell EMC Isilon
This commit is contained in:
Conrad Meyer 2017-01-12 17:02:29 +00:00
parent 9acdec7132
commit 484820d442
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311989
11 changed files with 29 additions and 29 deletions

View File

@ -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
/*

View File

@ -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;

View File

@ -523,14 +523,14 @@ ucs4_to_utf8(uint32_t ucs4, char *dst, size_t *utf8width, size_t dstlen)
}
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);

View File

@ -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);

View File

@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$");
void *
memmem(const void *l, size_t l_len, const void *s, size_t s_len)
{
register char *cur, *last;
char *cur, *last;
const char *cl = (const char *)l;
const char *cs = (const char *)s;

View File

@ -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).

View File

@ -48,10 +48,10 @@ static __inline void swapfunc(char *, char *, int, int);
*/
#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); \

View File

@ -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).

View File

@ -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) {

View File

@ -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)

View File

@ -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) {