diff mbox series

[ovs-dev,v3,01/17] table: Introduce a constant for default table style.

Message ID 20180713183624.16937-2-jkbs@redhat.com
State Superseded
Headers show
Series Daemon mode for ovn-nbctl | expand

Commit Message

Jakub Sitnicki July 13, 2018, 6:36 p.m. UTC
Having a constant in addition to the constant expression for the default
table style allows us to reset 'struct table_style' variables to default
style.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
---
 lib/table.h | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/lib/table.h b/lib/table.h
index 313ac1dd2..76e65bb70 100644
--- a/lib/table.h
+++ b/lib/table.h
@@ -20,6 +20,7 @@ 
 #include <stdbool.h>
 #include <stddef.h>
 #include "compiler.h"
+#include "openvswitch/json.h"
 
 struct ds;
 struct table_style;
@@ -83,6 +84,7 @@  struct table_style {
 };
 
 #define TABLE_STYLE_DEFAULT { TF_LIST, CF_STRING, true, JSSF_SORT, 0 }
+static const struct table_style table_style_default = TABLE_STYLE_DEFAULT;
 
 #define TABLE_OPTION_ENUMS                      \
     OPT_NO_HEADINGS,                            \