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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user