From f36a996d66464ab888ef66d81cfdbfb067673e2f Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Tue, 14 Sep 2004 18:23:15 +0000 Subject: [PATCH] Make clnt_create take both host and proto as const char * arguments. --- include/rpc/clnt.h | 8 ++++---- lib/libc/rpc/clnt_generic.c | 8 ++------ lib/libc/rpc/rpc.3 | 4 ++-- lib/libcr/rpc/clnt_generic.c | 8 ++------ lib/libcr/rpc/rpc.3 | 4 ++-- 5 files changed, 12 insertions(+), 20 deletions(-) diff --git a/include/rpc/clnt.h b/include/rpc/clnt.h index 292321b066..9d4153acb6 100644 --- a/include/rpc/clnt.h +++ b/include/rpc/clnt.h @@ -29,7 +29,7 @@ * from: @(#)clnt.h 1.31 88/02/08 SMI * from: @(#)clnt.h 2.1 88/07/29 4.0 RPCSRC * $FreeBSD: src/include/rpc/clnt.h,v 1.11.2.1 2001/06/28 21:44:09 iedowse Exp $ - * $DragonFly: src/include/rpc/clnt.h,v 1.3 2003/11/14 01:01:50 dillon Exp $ + * $DragonFly: src/include/rpc/clnt.h,v 1.4 2004/09/14 18:23:15 joerg Exp $ */ /* @@ -290,13 +290,13 @@ __END_DECLS * and "unix". * CLIENT * * clnt_create(host, prog, vers, prot); - * char *host; -- hostname + * const char *host; -- hostname * u_long prog; -- program number * u_long vers; -- version number - * char *prot; -- protocol + * const char *prot; -- protocol */ __BEGIN_DECLS -extern CLIENT *clnt_create (char *, u_long, u_long, char *); +CLIENT * clnt_create(const char *, u_long, u_long, const char *); __END_DECLS diff --git a/lib/libc/rpc/clnt_generic.c b/lib/libc/rpc/clnt_generic.c index 559864ed0e..ad22653a61 100644 --- a/lib/libc/rpc/clnt_generic.c +++ b/lib/libc/rpc/clnt_generic.c @@ -29,7 +29,7 @@ * @(#)clnt_generic.c 1.4 87/08/11 (C) 1987 SMI * @(#)clnt_generic.c 2.2 88/08/01 4.0 RPCSRC * $FreeBSD: src/lib/libc/rpc/clnt_generic.c,v 1.9.2.1 2001/03/05 10:48:28 obrien Exp $ - * $DragonFly: src/lib/libc/rpc/clnt_generic.c,v 1.2 2003/06/17 04:26:44 dillon Exp $ + * $DragonFly: src/lib/libc/rpc/clnt_generic.c,v 1.3 2004/09/14 18:23:15 joerg Exp $ */ /* @@ -47,11 +47,7 @@ * change using the rpc equivalent of ioctl()'s. */ CLIENT * -clnt_create(hostname, prog, vers, proto) - char *hostname; - u_long prog; - u_long vers; - char *proto; +clnt_create(const char *hostname, u_long prog, u_long vers, const char *proto) { struct hostent *h; struct protoent *p; diff --git a/lib/libc/rpc/rpc.3 b/lib/libc/rpc/rpc.3 index 5e24c0754d..d81f068e97 100644 --- a/lib/libc/rpc/rpc.3 +++ b/lib/libc/rpc/rpc.3 @@ -1,6 +1,6 @@ .\" @(#)rpc.3n 2.4 88/08/08 4.0 RPCSRC; from 1.19 88/06/24 SMI .\" $FreeBSD: src/lib/libc/rpc/rpc.3,v 1.11.2.5 2001/12/14 18:33:56 ru Exp $ -.\" $DragonFly: src/lib/libc/rpc/rpc.3,v 1.2 2003/06/17 04:26:45 dillon Exp $ +.\" $DragonFly: src/lib/libc/rpc/rpc.3,v 1.3 2004/09/14 18:23:15 joerg Exp $ .\" .Dd February 16, 1988 .Dt RPC 3 @@ -260,7 +260,7 @@ Otherwise, the socket remains open. .Ft CLIENT * .Xc .It Xo -.Fn clnt_create "char *host" "u_long prog" "u_long vers" "char *proto" +.Fn clnt_create "onst char *host" "u_long prog" "u_long vers" "const char *proto" .Xc .Pp Generic client creation routine. diff --git a/lib/libcr/rpc/clnt_generic.c b/lib/libcr/rpc/clnt_generic.c index 16e670e4f1..a58aa1219b 100644 --- a/lib/libcr/rpc/clnt_generic.c +++ b/lib/libcr/rpc/clnt_generic.c @@ -29,7 +29,7 @@ * @(#)clnt_generic.c 1.4 87/08/11 (C) 1987 SMI * @(#)clnt_generic.c 2.2 88/08/01 4.0 RPCSRC * $FreeBSD: src/lib/libc/rpc/clnt_generic.c,v 1.9.2.1 2001/03/05 10:48:28 obrien Exp $ - * $DragonFly: src/lib/libcr/rpc/Attic/clnt_generic.c,v 1.2 2003/06/17 04:26:44 dillon Exp $ + * $DragonFly: src/lib/libcr/rpc/Attic/clnt_generic.c,v 1.3 2004/09/14 18:23:15 joerg Exp $ */ /* @@ -47,11 +47,7 @@ * change using the rpc equivalent of ioctl()'s. */ CLIENT * -clnt_create(hostname, prog, vers, proto) - char *hostname; - u_long prog; - u_long vers; - char *proto; +clnt_create(const char *hostname, u_long prog, u_long vers, const char *proto) { struct hostent *h; struct protoent *p; diff --git a/lib/libcr/rpc/rpc.3 b/lib/libcr/rpc/rpc.3 index d49eeaabb6..8c4ca2d746 100644 --- a/lib/libcr/rpc/rpc.3 +++ b/lib/libcr/rpc/rpc.3 @@ -1,6 +1,6 @@ .\" @(#)rpc.3n 2.4 88/08/08 4.0 RPCSRC; from 1.19 88/06/24 SMI .\" $FreeBSD: src/lib/libc/rpc/rpc.3,v 1.11.2.5 2001/12/14 18:33:56 ru Exp $ -.\" $DragonFly: src/lib/libcr/rpc/Attic/rpc.3,v 1.2 2003/06/17 04:26:45 dillon Exp $ +.\" $DragonFly: src/lib/libcr/rpc/Attic/rpc.3,v 1.3 2004/09/14 18:23:15 joerg Exp $ .\" .Dd February 16, 1988 .Dt RPC 3 @@ -260,7 +260,7 @@ Otherwise, the socket remains open. .Ft CLIENT * .Xc .It Xo -.Fn clnt_create "char *host" "u_long prog" "u_long vers" "char *proto" +.Fn clnt_create "const char *host" "u_long prog" "u_long vers" "const char *proto" .Xc .Pp Generic client creation routine. -- 2.41.0