Arjen de Korte
2010-Nov-03 16:03 UTC
[Nut-upsdev] [nut-commits] svn commit r2658 - in branches/windows_port: common include server
Citeren Frederic BOHE <fbohe-guest op alioth.debian.org>:> +#ifdef WIN32 > + int noservice_flag = 0; > + HANDLE svc_stop = NULL; > + SERVICE_STATUS SvcStatus; > + SERVICE_STATUS_HANDLE SvcStatusHandle; > +#endifAs far as I can tell, the SvcStatus and SvcStatusHanle variables are only used in conjunction within this module. In that case, consider not to export them in common.h and declare them static in common.c. This keeps the interface clean and will also prevent other modules messing with them behind your back. Best regards, Arjen -- Please keep list traffic on the list (off-list replies will be rejected)
Frédéric Bohé
2010-Nov-04 13:45 UTC
[Nut-upsdev] [nut-commits] svn commit r2658 - in branches/windows_port: common include server
On mer., 2010-11-03 at 16:44 +0100, Arjen de Korte wrote:> Citeren Frederic BOHE <fbohe-guest at alioth.debian.org>: > > > +#ifdef WIN32 > > + int noservice_flag = 0; > > + HANDLE svc_stop = NULL; > > + SERVICE_STATUS SvcStatus; > > + SERVICE_STATUS_HANDLE SvcStatusHandle; > > +#endif > > As far as I can tell, the SvcStatus and SvcStatusHanle variables are > only used in conjunction within this module. In that case, consider > not to export them in common.h and declare them static in common.c. > This keeps the interface clean and will also prevent other modules > messing with them behind your back. >Currently, they are used in upsd.c too. But this is code that will need factorization too. After that, I will remove the extern variables from common.h regards Fred> Best regards, Arjen--------------------------------------------------------------------------