From: Ben Pfaff Date: Wed, 3 Feb 2016 20:23:36 +0000 (-0800) Subject: vlog: Make 'vlog_modules' private to vlog.c. X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=934d84fb0d372b2b4a3a3738531b6edb762073c8 vlog: Make 'vlog_modules' private to vlog.c. 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 Acked-by: Russell Bryant --- diff --git a/include/openvswitch/vlog.h b/include/openvswitch/vlog.h index 530960272..739c049a8 100644 --- a/include/openvswitch/vlog.h +++ b/include/openvswitch/vlog.h @@ -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. */ diff --git a/lib/vlog.c b/lib/vlog.c index 28cea5ddb..3d0b87c48 100644 --- a/lib/vlog.c +++ b/lib/vlog.c @@ -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