Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Dev

[PATCH] Low: cleanup: remove unused variables, etc.

 

 

Linux-HA dev RSS feed   Index | Next | Previous | View Threaded


heder at google

Jun 22, 2009, 3:07 AM

Post #1 of 2 (281 views)
Permalink
[PATCH] Low: cleanup: remove unused variables, etc.

Fix following issues:
- remove unused variables
- use NULL instead of plain integer
- declare global variable in header file
- etc.

Signed-off-by: Hannes Eder <heder[at]google.com>
---

diff -r 1f9ec03ac59b include/stonith/stonith.h
--- a/include/stonith/stonith.h Thu Jun 18 12:27:26 2009 +0200
+++ b/include/stonith/stonith.h Mon Jun 22 11:09:35 2009 +0200
@@ -88,6 +88,8 @@
#define ST_DEVICEDESCR 4 /* Device Description text */
#define ST_DEVICEURL 5 /* Manufacturer/Device URL */

+extern PILPluginUniv *StonithPIsys;
+
char ** stonith_types(void); /* NULL-terminated list */
/* valid until next call of stonith_types() */
Stonith*stonith_new(const char * type);
diff -r 1f9ec03ac59b lib/clplumbing/cl_log.c
--- a/lib/clplumbing/cl_log.c Thu Jun 18 12:27:26 2009 +0200
+++ b/lib/clplumbing/cl_log.c Mon Jun 22 11:09:35 2009 +0200
@@ -567,7 +567,6 @@
* non-blocking IPC.
*/

-gboolean last_log_failed = FALSE;
static int cl_log_depth = 0;

/* Cluster logging function */
diff -r 1f9ec03ac59b lib/plugins/lrm/raexecocf.c
--- a/lib/plugins/lrm/raexecocf.c Thu Jun 18 12:27:26 2009 +0200
+++ b/lib/plugins/lrm/raexecocf.c Mon Jun 22 11:09:35 2009 +0200
@@ -238,7 +238,7 @@
"will cause memory leak.");
*rsc_info = NULL;
}
- file_num = scandir(RA_PATH, &namelist, 0, alphasort);
+ file_num = scandir(RA_PATH, &namelist, NULL, alphasort);
if (file_num < 0) {
return -2;
}
diff -r 1f9ec03ac59b tools/sfex_daemon.c
--- a/tools/sfex_daemon.c Thu Jun 18 12:27:26 2009 +0200
+++ b/tools/sfex_daemon.c Mon Jun 22 11:09:35 2009 +0200
@@ -18,7 +18,6 @@
static int lock_index = 1; /* default 1st lock */
static time_t collision_timeout = 1; /* default 1 sec */
static time_t lock_timeout = 60; /* default 60 sec */
-time_t unlock_timeout = 60;
static time_t monitor_interval = 10;

static sfex_controldata cdata;
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev[at]lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


dejanmm at fastmail

Jun 22, 2009, 3:41 AM

Post #2 of 2 (248 views)
Permalink
Re: [PATCH] Low: cleanup: remove unused variables, etc. [In reply to]

Applied.

Cheers,

Dejan

On Mon, Jun 22, 2009 at 12:07:38PM +0200, Hannes Eder wrote:
> Fix following issues:
> - remove unused variables
> - use NULL instead of plain integer
> - declare global variable in header file
> - etc.
>
> Signed-off-by: Hannes Eder <heder[at]google.com>
> ---
>
> diff -r 1f9ec03ac59b include/stonith/stonith.h
> --- a/include/stonith/stonith.h Thu Jun 18 12:27:26 2009 +0200
> +++ b/include/stonith/stonith.h Mon Jun 22 11:09:35 2009 +0200
> @@ -88,6 +88,8 @@
> #define ST_DEVICEDESCR 4 /* Device Description text */
> #define ST_DEVICEURL 5 /* Manufacturer/Device URL */
>
> +extern PILPluginUniv *StonithPIsys;
> +
> char ** stonith_types(void); /* NULL-terminated list */
> /* valid until next call of stonith_types() */
> Stonith*stonith_new(const char * type);
> diff -r 1f9ec03ac59b lib/clplumbing/cl_log.c
> --- a/lib/clplumbing/cl_log.c Thu Jun 18 12:27:26 2009 +0200
> +++ b/lib/clplumbing/cl_log.c Mon Jun 22 11:09:35 2009 +0200
> @@ -567,7 +567,6 @@
> * non-blocking IPC.
> */
>
> -gboolean last_log_failed = FALSE;
> static int cl_log_depth = 0;
>
> /* Cluster logging function */
> diff -r 1f9ec03ac59b lib/plugins/lrm/raexecocf.c
> --- a/lib/plugins/lrm/raexecocf.c Thu Jun 18 12:27:26 2009 +0200
> +++ b/lib/plugins/lrm/raexecocf.c Mon Jun 22 11:09:35 2009 +0200
> @@ -238,7 +238,7 @@
> "will cause memory leak.");
> *rsc_info = NULL;
> }
> - file_num = scandir(RA_PATH, &namelist, 0, alphasort);
> + file_num = scandir(RA_PATH, &namelist, NULL, alphasort);
> if (file_num < 0) {
> return -2;
> }
> diff -r 1f9ec03ac59b tools/sfex_daemon.c
> --- a/tools/sfex_daemon.c Thu Jun 18 12:27:26 2009 +0200
> +++ b/tools/sfex_daemon.c Mon Jun 22 11:09:35 2009 +0200
> @@ -18,7 +18,6 @@
> static int lock_index = 1; /* default 1st lock */
> static time_t collision_timeout = 1; /* default 1 sec */
> static time_t lock_timeout = 60; /* default 60 sec */
> -time_t unlock_timeout = 60;
> static time_t monitor_interval = 10;
>
> static sfex_controldata cdata;
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev[at]lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev[at]lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Linux-HA dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.