[dm-devel] [PATCH 10/15] libmultipath: Move the definition of a global variable from .h to .c
Bart Van Assche
bart.vanassche at sandisk.com
Fri Oct 21 18:44:58 UTC 2016
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 at sandisk.com>
---
libmultipath/log.c | 2 ++
libmultipath/log.h | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
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);
--
2.10.1
More information about the dm-devel
mailing list