diff options
author | alfred <alfred@FreeBSD.org> | 2002-03-22 20:02:54 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-03-22 20:02:54 +0000 |
commit | 612a0d6d9fbb334b184184eca3b11b50d3c5868c (patch) | |
tree | 047bc5d8573141f2a419a9775b65478ccbfe7d96 | |
parent | eaa965988d51902feac415a68eee2fc4d3a6a860 (diff) | |
download | FreeBSD-src-612a0d6d9fbb334b184184eca3b11b50d3c5868c.zip FreeBSD-src-612a0d6d9fbb334b184184eca3b11b50d3c5868c.tar.gz |
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.
-rw-r--r-- | usr.sbin/rpc.lockd/lockd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/rpc.lockd/lockd.c b/usr.sbin/rpc.lockd/lockd.c index 56fc884..a31f6a0 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 */ |