Change the type of "len" to avoid warnings.

The "len" variable is used as the last argument to getsockname(2) and
accept(2). It was declared an "int" and this patch changes it to "socklen_t".
This commit is contained in:
Rick Macklem 2020-04-18 23:46:58 +00:00
parent 420a5a2445
commit 3c49a19fc9

View File

@ -101,13 +101,14 @@ main(int argc, char *argv[])
struct nfsd_nfscbd_args nfscbdargs2;
struct sockaddr_in inetaddr, inetpeer;
fd_set ready, sockbits;
int ch, connect_type_cnt, len, maxsock, msgsock, error;
int ch, connect_type_cnt, maxsock, msgsock, error;
int nfssvc_flag, on, sock, tcpsock, ret, mustfreeai = 0;
char *cp, princname[128];
char myname[MAXHOSTNAMELEN], *myfqdnname = NULL;
struct addrinfo *aip, hints;
pid_t pid;
short myport = NFSV4_CBPORT;
socklen_t len;
if (modfind("nfscl") < 0) {
/* Not present in kernel, try loading it */