2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

vlog: Make the most common module reference more direct.

Most vlog calls are for the log module owned by the translation unit being
compiled, but this module was referenced indirectly through a pointer
variable.  That seems silly, so this commit changes the code so that the
local vlog module is referred to directly, as &this_module.

We could get rid of the global variables for vlog modules entirely, but
I like getting linker errors when there's a duplicate module name.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Russell Bryant <russell@ovn.org>
This commit is contained in:
Ben Pfaff
2016-02-03 13:21:10 -08:00
parent 3ca6cc76c3
commit 922fed065e
14 changed files with 58 additions and 58 deletions

View File

@@ -1992,7 +1992,7 @@ ctl_fatal(const char *format, ...)
message = xvasprintf(format, args);
va_end(args);
vlog_set_levels(&VLM_db_ctl_base, VLF_CONSOLE, VLL_OFF);
vlog_set_levels(&this_module, VLF_CONSOLE, VLL_OFF);
VLOG_ERR("%s", message);
ovs_error(0, "%s", message);
ctl_exit(EXIT_FAILURE);