diff mbox

[10/15] libmultipath: Move the definition of a global variable from .h to .c

Message ID 969ce5d1-2b69-7ddf-b8e0-ba5bee08d8b3@sandisk.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show

Commit Message

Bart Van Assche Oct. 21, 2016, 6:44 p.m. UTC
This change does not change the semantics of the code but makes
it easier for sparse to analyze the source code.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
---
 libmultipath/log.c | 2 ++
 libmultipath/log.h | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libmultipath/log.c b/libmultipath/log.c
index ab92e2a..debd36d 100644
--- a/libmultipath/log.c
+++ b/libmultipath/log.c
@@ -15,6 +15,8 @@ 
 
 #define ALIGN(len, s) (((len)+(s)-1)/(s)*(s))
 
+struct logarea* la;
+
 #if LOGDBG
 static void dump_logarea (void)
 {
diff --git a/libmultipath/log.h b/libmultipath/log.h
index 984f047..6551b5c 100644
--- a/libmultipath/log.h
+++ b/libmultipath/log.h
@@ -29,7 +29,7 @@  struct logarea {
 	char * buff;
 };
 
-struct logarea * la;
+extern struct logarea* la;
 
 int log_init (char * progname, int size);
 void log_close (void);