vlog: Make 'vlog_modules' private to vlog.c.
authorBen Pfaff <blp@ovn.org>
Wed, 3 Feb 2016 20:23:36 +0000 (12:23 -0800)
committerBen Pfaff <blp@ovn.org>
Wed, 3 Feb 2016 23:10:01 +0000 (15:10 -0800)
I think we once used this variable from an inline function in vlog.h, so
that we had to make it "extern", but these days it's only used from vlog.c,
so it can be static now.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Russell Bryant <russell@ovn.org>
include/openvswitch/vlog.h
lib/vlog.c

index 5309602..739c049 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2016 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -86,9 +86,6 @@ struct vlog_module {
     bool honor_rate_limits;       /* Set false to ignore rate limits. */
 };
 
-/* Global list of all logging modules */
-extern struct ovs_list vlog_modules;
-
 void vlog_insert_module(struct ovs_list *);
 
 /* Creates and initializes a global instance of a module named MODULE. */
index 28cea5d..3d0b87c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2015 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2016 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -78,7 +78,7 @@ VLOG_LEVELS
 BUILD_ASSERT_DECL(LOG_LOCAL0 == (16 << 3));
 
 /* The log modules. */
-struct ovs_list vlog_modules = OVS_LIST_INITIALIZER(&vlog_modules);
+static struct ovs_list vlog_modules = OVS_LIST_INITIALIZER(&vlog_modules);
 
 /* Protects the 'pattern' in all "struct destination"s, so that a race between
  * changing and reading the pattern does not cause an access to freed