From e4b0fede2ccbaebbb7bf534ad67a12d4d2b9368a Mon Sep 17 00:00:00 2001 From: Alfred Perlstein Date: Fri, 22 Mar 2002 20:02:54 +0000 Subject: Use char foo[] = "BAR" to avoid direct assignment of const char * into char *. rpcgen can't really make those fields const because the remote side might want to munge them, so we need to pass non-const in. Hackish, but should work. --- usr.sbin/rpc.lockd/lockd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.sbin/rpc.lockd') diff --git a/usr.sbin/rpc.lockd/lockd.c b/usr.sbin/rpc.lockd/lockd.c index 56fc884c0632d..a31f6a0d5704a 100644 --- a/usr.sbin/rpc.lockd/lockd.c +++ b/usr.sbin/rpc.lockd/lockd.c @@ -230,6 +230,8 @@ init_nsm(void) enum clnt_stat ret; my_id id; sm_stat stat; + char name[] = "NFS NLM"; + char localhost[] = "localhost"; /* * !!! @@ -237,7 +239,7 @@ init_nsm(void) * as I know. Leave it empty for now. */ memset(&id, 0, sizeof(id)); - id.my_name = "NFS NLM"; + id.my_name = name; /* * !!! @@ -261,7 +263,7 @@ init_nsm(void) nsm_state = stat.state; /* setup constant data for SM_MON calls */ - mon_host.mon_id.my_id.my_name = "localhost"; + mon_host.mon_id.my_id.my_name = localhost; mon_host.mon_id.my_id.my_prog = NLM_PROG; mon_host.mon_id.my_id.my_vers = NLM_SM; mon_host.mon_id.my_id.my_proc = NLM_SM_NOTIFY; /* bsdi addition */ -- cgit v1.3