aboutsummaryrefslogtreecommitdiff
path: root/src/lib/rpc/getrpcent.c
diff options
context:
space:
mode:
authorThomas Sondergaard <tsondergaard@vitalimages.com>2018-06-16 18:14:50 +0200
committerGreg Hudson <ghudson@mit.edu>2018-06-18 13:17:31 -0400
commitbeeb2828945a41d86488e391ce440bacee0ec8a4 (patch)
treee7a2d7c7249365c331bc1887ce46c331a2d5b302 /src/lib/rpc/getrpcent.c
parent80ea4fe833c72e3be47509a3216eee726c5fdb26 (diff)
downloadkrb5-beeb2828945a41d86488e391ce440bacee0ec8a4.zip
krb5-beeb2828945a41d86488e391ce440bacee0ec8a4.tar.gz
krb5-beeb2828945a41d86488e391ce440bacee0ec8a4.tar.bz2
Eliminate use of the 'register' keyword
'register' is a reserved and unused keyword in C++17 so having it present in the public headers presents a a compatibility issue. Also in C the 'register' keyword is mostly obsolete, so remove all uses of it. [ghudson@mit.edu: adjusted style of some of the affected lines]
Diffstat (limited to 'src/lib/rpc/getrpcent.c')
-rw-r--r--src/lib/rpc/getrpcent.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/rpc/getrpcent.c b/src/lib/rpc/getrpcent.c
index db03dae..ad6793f 100644
--- a/src/lib/rpc/getrpcent.c
+++ b/src/lib/rpc/getrpcent.c
@@ -66,7 +66,7 @@ static char RPCDB[] = "/etc/rpc";
static struct rpcdata *
get_rpcdata(void)
{
- register struct rpcdata *d = rpcdata;
+ struct rpcdata *d = rpcdata;
if (d == 0) {
d = (struct rpcdata *)calloc(1, sizeof (struct rpcdata));
@@ -76,10 +76,10 @@ get_rpcdata(void)
}
struct rpcent *
-getrpcbynumber(register int number)
+getrpcbynumber(int number)
{
- register struct rpcdata *d = get_rpcdata();
- register struct rpcent *p;
+ struct rpcdata *d = get_rpcdata();
+ struct rpcent *p;
int reason;
char adrstr[16], *val = NULL;
int vallen;
@@ -116,7 +116,7 @@ getrpcbyname(const char *name)
SETRPCENT_TYPE setrpcent(int f)
{
- register struct rpcdata *d = _rpcdata();
+ struct rpcdata *d = _rpcdata();
if (d == 0)
return;
@@ -134,7 +134,7 @@ SETRPCENT_TYPE setrpcent(int f)
ENDRPCENT_TYPE endrpcent(void)
{
- register struct rpcdata *d = _rpcdata();
+ struct rpcdata *d = _rpcdata();
if (d == 0)
return;
@@ -155,7 +155,7 @@ getrpcent(void)
int reason;
char *key = NULL, *val = NULL;
int keylen, vallen;
- register struct rpcdata *d = _rpcdata();
+ struct rpcdata *d = _rpcdata();
if (d == 0)
return(NULL);
@@ -172,9 +172,9 @@ getrpcent(void)
static struct rpcent *
interpret(char *val, int len)
{
- register struct rpcdata *d = _rpcdata();
+ struct rpcdata *d = _rpcdata();
char *p;
- register char *cp, **q;
+ char *cp, **q;
if (d == 0)
return;