diff options
author | stefanf <stefanf@FreeBSD.org> | 2005-09-02 19:33:50 +0000 |
---|---|---|
committer | stefanf <stefanf@FreeBSD.org> | 2005-09-02 19:33:50 +0000 |
commit | 5147fb59678fdc458dd06b8ee8e25671557cda4d (patch) | |
tree | f4f831cb583e30f7f3062655bed9565a3b0fc5d3 /usr.bin/rpcgen | |
parent | f3dab5aa3e021d772bb9c2ddd3573beec43b0879 (diff) | |
download | FreeBSD-src-5147fb59678fdc458dd06b8ee8e25671557cda4d.zip FreeBSD-src-5147fb59678fdc458dd06b8ee8e25671557cda4d.tar.gz |
Use socklen_t variables when passing sizes to getsockname() and
getsockopt().
Diffstat (limited to 'usr.bin/rpcgen')
-rw-r--r-- | usr.bin/rpcgen/rpc_svcout.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/rpcgen/rpc_svcout.c b/usr.bin/rpcgen/rpc_svcout.c index bbf1dd8..5b6d0c7 100644 --- a/usr.bin/rpcgen/rpc_svcout.c +++ b/usr.bin/rpcgen/rpc_svcout.c @@ -164,7 +164,7 @@ serviced */\n"); if (pmflag) { if (tirpc_socket) { f_print(fout, "\tstruct sockaddr_storage saddr;\n"); - f_print(fout, "\tint asize = sizeof (saddr);\n\n"); + f_print(fout, "\tsocklen_t asize = sizeof (saddr);\n\n"); } else f_print(fout, "\tchar mname[FMNAMESZ + 1];\n\n"); } @@ -617,11 +617,11 @@ write_inetmost(infile) f_print(fout, "\tint sock;\n"); f_print(fout, "\tint proto;\n"); f_print(fout, "\tstruct sockaddr_in saddr;\n"); - f_print(fout, "\tint asize = sizeof (saddr);\n"); + f_print(fout, "\tsocklen_t asize = sizeof (saddr);\n"); f_print(fout, "\n"); f_print(fout, "\tif (getsockname(0, (struct sockaddr *)&saddr, &asize) == 0) {\n"); - f_print(fout, "\t\tint ssize = sizeof (int);\n\n"); + f_print(fout, "\t\tsocklen_t ssize = sizeof (int);\n\n"); f_print(fout, "\t\tif (saddr.sin_family != AF_INET)\n"); f_print(fout, "\t\t\texit(1);\n"); f_print(fout, "\t\tif (getsockopt(0, SOL_SOCKET, SO_TYPE,\n"); @@ -804,7 +804,7 @@ write_pm_most(infile, netflag) if (tirpc_socket) { f_print(fout, "\tif (getsockname(0, (struct sockaddr *)&saddr, &asize) == 0) {\n"); - f_print(fout, "\t\tint ssize = sizeof (int);\n"); + f_print(fout, "\t\tsocklen_t ssize = sizeof (int);\n"); } else { f_print(fout, "\tif (!ioctl(0, I_LOOK, mname) &&\n"); f_print(fout, "\t\t(!strcmp(mname, \"sockmod\") ||"); |