Hi Wei, If it's already initialized, it doesn't need to be initialized (by default) again here, no. But let's not create the precedent that we can call tirpc_control before calling svc_init().
Matt -- Matt Benjamin Red Hat, Inc. 315 West Huron Street, Suite 140A Ann Arbor, Michigan 48103 http://www.redhat.com/en/technologies/storage tel. 734-761-4689 fax. 734-769-8938 cel. 734-216-5309 ----- Original Message ----- > From: "Wei Fang" <fangw...@huawei.com> > To: m...@cohortfs.com > Cc: nfs-ganesha-devel@lists.sourceforge.net > Sent: Thursday, September 24, 2015 3:52:16 AM > Subject: Re: [Nfs-ganesha-devel] [PATCH] ntirpc: remove redundant assignment > of ->warnx > > Hi, Matt, > > On 2015/9/22 21:32, Matt W. Benjamin wrote: > > Hi, > > > > The svc_init() call is intended to precede any call to tirpc_control, and > > we do want this call to default-initialize. > > ->warnx has been initialized when __pkg_params was declared, is it necessary > to initialise it again here? > > thanks, > Wei > > > Regards, > > > > Matt > > > > ----- fangw...@huawei.com wrote: > > > >> From: Wei Fang <fangw...@huawei.com> > >> > >> ->warnx has been assigned defaultly. If we assigned here when > >> SVC_INIT_WARNX unsetted, ->warnx assigned by tirpc_control would be > >> overwrited to default, which we don't want to happen. > >> > >> Signed-off-by: Wei Fang <fangw...@huawei.com> > >> --- > >> src/svc.c | 2 -- > >> 1 files changed, 0 insertions(+), 2 deletions(-) > >> > >> diff --git a/src/svc.c b/src/svc.c > >> index 1ff1c84..c91386c 100644 > >> --- a/src/svc.c > >> +++ b/src/svc.c > >> @@ -147,8 +147,6 @@ svc_init(svc_init_params *params) > >> > >> if (params->flags & SVC_INIT_WARNX) > >> __ntirpc_pkg_params.warnx = params->warnx; > >> - else > >> - __ntirpc_pkg_params.warnx = warnx; > >> > >> /* svc_vc */ > >> __svc_params->xprt_u.vc.nconns = 0; > >> -- > >> 1.7.1 > > > > > ------------------------------------------------------------------------------ > Monitor Your Dynamic Infrastructure at Any Scale With Datadog! > Get real-time metrics from all of your servers, apps and tools > in one place. > SourceForge users - Click here to start your Free Trial of Datadog now! > http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140 > _______________________________________________ > Nfs-ganesha-devel mailing list > Nfs-ganesha-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel > ------------------------------------------------------------------------------ Monitor Your Dynamic Infrastructure at Any Scale With Datadog! Get real-time metrics from all of your servers, apps and tools in one place. SourceForge users - Click here to start your Free Trial of Datadog now! http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140 _______________________________________________ Nfs-ganesha-devel mailing list Nfs-ganesha-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel