Displaying 1 result from an estimated 1 matches for "lastcmd".
Did you mean:
last_cmd
2011 Aug 27
1
[PATCH 2/3] Fix use of uninitialized variable
...e-utalk.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/mge-utalk.c b/drivers/mge-utalk.c
index c6114c7..616e2ad 100644
--- a/drivers/mge-utalk.c
+++ b/drivers/mge-utalk.c
@@ -465,7 +465,8 @@ void upsdrv_shutdown(void)
{
char buf[BUFFLEN];
/* static time_t lastcmd = 0; */
-
+ memset(buf, 0, sizeof(buf));
+
if (sdtype == SD_RETURN) {
/* enable automatic restart */
mge_command(buf, sizeof(buf), "Sx 5");
--
1.7.4.4