[Nut-upsdev] Re: [nut-commits] svn commit r414 - in trunk: . drivers

Arjen de Korte nut+devel at de-korte.org
Tue Apr 25 06:51:40 UTC 2006


> Author: nba-guest
> Date: Mon Apr 24 20:45:39 2006
> New Revision: 414
>
> Modified:
>    trunk/CHANGES
>    trunk/drivers/cpsups.c
> Log:
> Fix C++ style declarations between statements
>
> Modified: trunk/CHANGES

Niels,

What is the reason for 'fixing' this? Constructions like these are used in
many locations throughout the sources (not only in the drivers, but also
in common and server). If there is a compelling reason to change this, we
need to do this in other parts as well. That will be quite an effort I
presume, so we should really consider if this is absolutely needed.
Personally, I don't think it is a big issue, since we would have seen many
more complaints about this.

Arjen
 ==============================================================================
> --- trunk/CHANGES	(original)
> +++ trunk/CHANGES	Mon Apr 24 20:45:39 2006
> @@ -1,3 +1,7 @@
> +Mon Apr 24 20:45:37 UTC 2006 / Niels Baggesen <nba at users.sourceforge.net>
> +
> + - drivers/cpsups.c: Fix C++ style declarations between statements
> +
>  Mon Apr 24 20:44:51 UTC 2006 / Niels Baggesen <nba at users.sourceforge.net>
>
>   - man/upscode2.8: Fix speling in man page
>
> Modified: trunk/drivers/cpsups.c
> ==============================================================================
> --- trunk/drivers/cpsups.c	(original)
> +++ trunk/drivers/cpsups.c	Mon Apr 24 20:45:39 2006
> @@ -147,6 +147,7 @@
>  	char values[20][200], *pos;
>  	int i = 0, battremain, length, rseconds;
>  	double rminutes;
> +	char temp1, *tmp1;
>
>  	while ((pollstatusmap[i].end != 0))
>  	{
> @@ -159,8 +160,8 @@
>  /*	These are used to hold status of UPS.
>   *	val1 = online/onbattery status
>   */
> -	char temp1=values[6][0];
> -	char *tmp1=&temp1;
> +	temp1=values[6][0];
> +	tmp1=&temp1;
>
>  	if ((*tmp1 & CPS_STAT_OL) && !(*tmp1 & CPS_STAT_OB))
>  		status_set("OL");
>
> _______________________________________________
> nut-commits mailing list
> nut-commits at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-commits
>
>



More information about the Nut-upsdev mailing list