[Nut-upsdev] bcmxcp: Patch for cosmetic code changes

Alf Høgemark alf at i100.no
Mon Jul 1 19:20:18 UTC 2013


Hi

Here is a very minor patch for the bcmxcp.c driver, mainly fixing the 
function name used in debug statement, and at the same time fix indentation.

Regards
Alf Hogemark

 From 86c7940d0ea11b5b38a7f4518095ee2428d658c7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alf=20H=C3=B8gemark?= <alf at i100.no>
Date: Mon, 1 Jul 2013 21:11:40 +0200
Subject: [PATCH] bcmxcp: Fix method name outputted in debug message, and 
minor
  fixes for indentation

---
  drivers/bcmxcp.c | 12 ++++++------
  1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/bcmxcp.c b/drivers/bcmxcp.c
index 2e5f18f..480258c 100644
--- a/drivers/bcmxcp.c
+++ b/drivers/bcmxcp.c
@@ -948,16 +948,16 @@ int init_outlet(unsigned char len)
          upsdebugx(2, "Auto delay off: %d\n", auto_dly_off);
          snprintf(outlet_name, sizeof(outlet_name)-1, 
"outlet.%d.delay.shutdown", num);
          dstate_setinfo(outlet_name, "%d", auto_dly_off);
-        dstate_setflags(outlet_name, ST_FLAG_RW | ST_FLAG_STRING);
-        dstate_setaux(outlet_name, 5);
+        dstate_setflags(outlet_name, ST_FLAG_RW | ST_FLAG_STRING);
+        dstate_setaux(outlet_name, 5);

          auto_dly_on = get_word(answer+iIndex);
          iIndex += 2;
          upsdebugx(2, "Auto delay on: %d\n", auto_dly_on);
          snprintf(outlet_name, sizeof(outlet_name)-1, 
"outlet.%d.delay.start", num);
          dstate_setinfo(outlet_name, "%d", auto_dly_on);
-        dstate_setflags(outlet_name, ST_FLAG_RW | ST_FLAG_STRING);
-        dstate_setaux(outlet_name, 5);
+        dstate_setflags(outlet_name, ST_FLAG_RW | ST_FLAG_STRING);
+        dstate_setaux(outlet_name, 5);
      }

      return num_outlet;
@@ -1267,7 +1267,7 @@ void upsdrv_initinfo(void)
      dstate_addcmd("test.battery.start");

      upsh.instcmd = instcmd;
-    upsh.setvar = setvar;
+    upsh.setvar = setvar;

      return;
  }
@@ -1871,6 +1871,6 @@ static const char *nut_find_infoval(info_lkp_t 
*xcp2info, const double value)
          }
      }

-    upsdebugx(3, "hu_find_infoval: no matching INFO_* value for this 
XCP value (%g)", value);
+    upsdebugx(3, "nut_find_infoval: no matching INFO_* value for this 
XCP value (%g)", value);
      return NULL;
  }
-- 
1.8.1.2




More information about the Nut-upsdev mailing list